Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setOnItemClickListener has the wrong position. #48

Open
ghost opened this issue Sep 24, 2014 · 3 comments
Open

setOnItemClickListener has the wrong position. #48

ghost opened this issue Sep 24, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 24, 2014

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) {

        }
    });
@orenk86
Copy link

orenk86 commented Oct 22, 2014

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

@snowdream
Copy link

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

@gustaveracosta
Copy link

Just do position + 1 and you will be ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants