Code example for CompoundButton

Methods: getId

0
 
 
	@Override 
	public void onCheckedChanged(CompoundButton arg0, boolean arg1) {
		// TODO Auto-generated method stub 
		if (arg0.getId() == 0) {
			if (arg1 == true) {
//				lCheck.get(arg0.getId()).setBackgroundResource( 
//						R.drawable.my_border_edittext_open_bottom_selected); 
			} else { 
//				lCheck.get(arg0.getId()).setBackgroundResource( 
//						R.drawable.my_border_edittext_open_bottom); 
			} 
		} else if (arg0.getId() == lCheck.size() - 1) {
			if (arg1 == true) {
//				lCheck.get(arg0.getId()).setBackgroundResource( 
//						R.drawable.my_border_edittext_open_top_selected); 
			} else { 
//				lCheck.get(arg0.getId()).setBackgroundResource( 
//						R.drawable.my_border_edittext_open_top); 
			}