2024年3月13日发(作者:)

int scroll_num = 10;

ViewHolder holder;

HashMap isSelected;

MyAdapter adapter;

ArrayList data;

HashMap map;

ListView mListView;

Button btn_all;

Button btn_none;

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

te(savedInstanceState);

setContentView();

mListView = (ListView)findViewById(_listview);

btn_all = (Button)findViewById(_all);

btn_none = (Button)findViewById(_none);

//初始化数据

init_data();

//设置按钮点击事件

init_btn();

//设置listview

init_listview();

}

//初始化数据

public void init_data(){

data = new ArrayList();

for(int i = 0; i<20; i++){

map = new HashMap();

("title", "title-->"+i);

("content", "content-------------------------------->"+i);

(map);

}