Develop tool: IntelliJ IDEA
Coding below:
src/com.hhy.OnCheckedChangeListener/MyActivity:
package com.hhy.OnCheckedChangeListener;
import android.app.Activity;
import android.os.Bundle;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.TextView;
import org.w3c.dom.Text;
public class MyActivity extends Activity {
private CheckBox eat, drink, play, fun, all;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
eat = (CheckBox)findViewById(R.id.eat);
drink = (CheckBox)findViewById(R.id.drink);
play = (CheckBox)findViewById(R.id.play);
fun = (CheckBox)findViewById(R.i