我需要幫助獲取點擊項目時點擊多少次列表項目。請幫幫我。如果5月列表項被點擊兩次,我想拿到項目計數如何獲得listview的數量項目被點擊android
rightList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
int len = rightList.getCount();
item = data1.get(position);
int count = rightList.indexOfChild(view);
int cont=0;
}
看到這一點:http://stackoverflow.com/questions/18030384/get-listview-item-clicked-count-in-android – rafsanahmad007