Code example for RadioButton

Methods: setCheckedsetSelected

0
		Log.d(TAG,"setDigital("+v+"), id="+this.myNumber);
		digitalValue=v;
		(mActivity).runOnUiThread(new Runnable(){
			@Override 
            public void run(){ 
		      mRadioAD.setSelected(true);
		      mRadioAD.setChecked(true);
		      if(digitalValue==1){
	    	     mD1.setSelected(true);
	    	     mD1.setBackgroundColor(0xff10f0f0);
	    	     mD0.setSelected(false);
	    	     mD0.setBackgroundColor(0xfff0f0f0);
		      } 
		      else { 
			     mD1.setSelected(false);
			     mD1.setBackgroundColor(0xfff0f0f0);
			     mD0.setSelected(true);
			     mD0.setBackgroundColor(0xfff01010);
		      } 
			} 
Experience pair programming with AI  Get Codota for Java