Code example for ToggleButton

Methods: getText

			public void onClick(View v) {
			   StringBuffer result = new StringBuffer();
			   result.append("Remainder in").append(toggleButton.getText());
			   Toast.makeText(MainActivity.this, result.toString(),
		final LinearLayout layout = (LinearLayout) findViewById(;
		 final RadioButton[] rb = new RadioButton[3];
		    final RadioGroup rg = new RadioGroup(getApplicationContext()); //create the RadioGroup
		    rg.setOrientation(RadioGroup.HORIZONTAL);//or RadioGroup.VERTICAL
Stop searching for code, let great code find you!  Add Codota to your java IDE