PullToRefresh-ListView icon indicating copy to clipboard operation
PullToRefresh-ListView copied to clipboard

setOnItemClickListener has the wrong position.

Open ghost opened this issue 10 years ago • 3 comments

The position is wrong (may be -1) if item is clicked when pulling or refreshing.

    listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {

        }
    });

ghost avatar Sep 24 '14 08:09 ghost

Any news on this? I'm having the same problem as well.

orenk86 avatar Oct 22 '14 08:10 orenk86

the listview has a head view as default. if you add head view , the count will be more.

snowdream avatar Jan 21 '15 08:01 snowdream

Just do position + 1 and you will be ok

gustaveracosta avatar Jun 15 '15 18:06 gustaveracosta