public class MainActivity extends AppCompatActivity {
private List<String> list = new ArrayList<>();
private ListView lv;
private CheckBox checkbox;
private Button button;
private CheckBox cb;
private TextView text;
private int count = 0;
private List<Boolean> checklist = new ArrayList<>();
private TextView price;
private MyAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lv = (ListView) findViewById(R.id.list_view);
checkbox = (CheckBox) findViewById(R.id.checkBox);
button = (Button) findViewById(R.id.reverse);
//添加数据
setData();
//适配数据
private List<String> list = new ArrayList<>();
private ListView lv;
private CheckBox checkbox;
private Button button;
private CheckBox cb;
private TextView text;
private int count = 0;
private List<Boolean> checklist = new ArrayList<>();
private TextView price;
private MyAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lv = (ListView) findViewById(R.id.list_view);
checkbox = (CheckBox) findViewById(R.id.checkBox);
button = (Button) findViewById(R.id.reverse);
//添加数据
setData();
//适配数据