Code example for RadioButton

Methods: getId

0
			@Override 
			public void onCheckedChanged(RadioGroup group, int checkedId) {
				if(theme1.getId()==checkedId){
					System.out.println("theme1");
				} 
				else if(theme2.getId()==checkedId){
					System.out.println("theme2");
				} 
				else if(theme3.getId()==checkedId){
					System.out.println("theme3");
				} 
			} 
		}); 
		 
		button=(Button)findViewById(R.id.surebutton);
		button.setOnClickListener(new ButtonListener());
 
	} 
 
	class ButtonListener implements OnClickListener{