Code example for ColorMatrixColorFilter

Methods: setColorFilter

0
	 */ 
	public final static OnTouchListener buttonOnTouchListener = new OnTouchListener() {
		@Override 
		public boolean onTouch(View v, MotionEvent event) { 
			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);