Set ToggleButton on/off text
package app.test; import android.app.Activity; import android.os.Bundle; public class Test extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } //main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" > <Button android:id="@+id/ccbtn1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Basic Button" /> <ImageButton android:id="@+id/ccbtn2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Image Button" android:src="@drawable/icon" /> <ToggleButton android:id="@+id/ccbtn3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Toggle Button" android:textOff="Start" android:textOn="Stop" /> </LinearLayout>