Code example for RectF

Methods: set

0
 
	@Override 
	protected void onBoundsChange(Rect bounds)
	{ 
		super.onBoundsChange(bounds);
		innerRect.set(bounds);
	} 
 
	@Override 
	protected boolean onStateChange(int[] stateSet) {
		boolean changed = super.onStateChange(stateSet);
		changed = setState(stateSet);
		boolean drawableChanged = false;
		if (background != null) {
//			Log.e("TiBackground", "background="+background.getClass().getSimpleName()+",state.len="+stateSet.length); 
//			for (int i = 0; i < stateSet.length; i++) { 
//				Log.e("TiBackground", "    state[" + i + "]=" + stateSet[i]); 
//			} 
			drawableChanged = background.setState(stateSet);
			if (drawableChanged) {
				invalidateSelf();