Code example for ToggleButton

Methods: getText

0
	  
			@Override 
			public void onClick(View v) {
	  
			   StringBuffer result = new StringBuffer();
			   result.append("Remainder in").append(toggleButton.getText());
		   
			   Toast.makeText(MainActivity.this, result.toString(),
				Toast.LENGTH_SHORT).show();
	  
			} 
	  
		}); 
	 
		final LinearLayout layout = (LinearLayout) findViewById(R.id.taskPrototypes);
		 
		 
		 final RadioButton[] rb = new RadioButton[3];
		    final RadioGroup rg = new RadioGroup(getApplicationContext()); //create the RadioGroup
		    rg.setOrientation(RadioGroup.HORIZONTAL);//or RadioGroup.VERTICAL
		    for(int i=0; i<3; i++){