下面我实际上在滚动列表视图时编写了我的代码,复选框处于其原始位置,任何代码帮助将不胜感激。
cp.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
cp.setChecked(true);
cx.setChecked(false);
ck.setChecked(false);
int a=1;
String c=getListView().getItemAtPosition(position).toString();
updatetable(c, "FULL");
//Toast.makeText(getApplicationContext(), c+"full", Toast.LENGTH_LONG).show();
// Toast.makeText(getApplicationContext(), "year", Toast.LENGTH_LONG).show();
}
});
cx.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
cx.setChecked(true);
cp.setChecked(false);
ck.setChecked(false);
int a=1;
String c=getListView().getItemAtPosition(position).toString();
updatetable(c, "CRITICAL");
//Toast.makeText(getApplicationContext(), c+"ok", Toast.LENGTH_LONG).show();
}
});
ck.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
ck.setOnCheckedChangeListener(null);
// TODO Auto-generated method stub
ck.setChecked(true);
cp.setChecked(false);
cx.setChecked(false);
int a=1;
String c=getListView().getItemAtPosition(position).toString();
updatetable(c, "FINISH");
//Toast.makeText(getApplicationContext(), c+"fineshed", Toast.LENGTH_LONG).show();
}
});