-1
我如何知道toggleButton被選中或未被選中。 請你回答我的問題becouse我需要it.Thank所有我如何知道toggleButton被選中或未被選中
XML:
<ToggleButton
android:id="@+id/toggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
的java:
public class Setting extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_setting);
}
}
http://www.compiletimeerror.com/2013/08/android-togglebutton-example.html#.VelcWGSqpBc – SANAT
當你想知道的切換按鈕的狀態?在'onCreate'? – Panther