我怎么知道CheckBox被点击或没有点击? 感谢所有我怎么知道CheckBox被点击或没有点击?
XML文件:
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CheckBox" />
的java文件:
public class Setting extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_setting);
}
}
'((复选框)findViewById(R.id.checkBox).setOnCheckedChangedListener(...)' –
可能重复[Android:复选框侦听器](http://stackoverflow.com/questions/8386832/android-checkbox-listener) –