Code example for ColorMatrixColorFilter

Methods: setColorFilter

0
			if (event.getAction() == MotionEvent.ACTION_DOWN) { 
				v.getBackground().setColorFilter( 
						new ColorMatrixColorFilter(BT_SELECTED)); 
				v.setBackgroundDrawable(v.getBackground()); 
			} else if (event.getAction() == MotionEvent.ACTION_UP) { 
				v.getBackground().setColorFilter( 
						new ColorMatrixColorFilter(BT_NOT_SELECTED)); 
				v.setBackgroundDrawable(v.getBackground()); 
			} 
			return false; 
		} 
 
	}; 
 
	public final static void setButtonFocusChanged(View inView) {
		inView.setOnTouchListener(buttonOnTouchListener);
		inView.setOnFocusChangeListener(buttonOnFocusChangeListener);
	} 
 
}