Code example for TypedArray

Methods: getDimensionPixelSizegetTextArrayrecycle

0
 
		TypedArray a = context.obtainStyledAttributes(attrs,
				R_styleable_LinearListView);
 
		// Use the thickness specified, zero being the default 
		final int thickness = a.getDimensionPixelSize(
				LinearListView_dividerThickness, 0);
		if (thickness != 0) {
			setDividerThickness(thickness);
		} 
 
		CharSequence[] entries = a.getTextArray(LinearListView_entries);
		if (entries != null) {
			setAdapter(new ArrayAdapter<CharSequence>(context,
					android.R.layout.simple_list_item_1, entries));
		} 
 
		a.recycle();
	} 
 
	@Override 
	public void setOrientation(int orientation) {
		if (orientation != getOrientation()) {
Connect your IDE to all the code out there  Get Codota for Java