Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Click on a pinned item, not working properly #75

Open
han4wluc opened this issue Sep 15, 2015 · 4 comments
Open

Click on a pinned item, not working properly #75

han4wluc opened this issue Sep 15, 2015 · 4 comments

Comments

@han4wluc
Copy link

When I click on a pinned item (only when it is floating on the top) , it calls the click on the item behind it instead.

I have a setOnItemClickListener on the list view. and setClickListener on the pinned item inside the adapter.

@shihabmi7
Copy link

i am also facing same problem. mr. han4wluc are you solve the problem?

@han4wluc
Copy link
Author

unfortunately I was not

@shihabmi7
Copy link

I am trying to solve the issue. But I am only manage to solve when header are clicked, But can't manage when item is clicked.

The issue no 49. describes little but not enough for me.

#49

@qqli007
Copy link

qqli007 commented Apr 11, 2017

the same problem on android n.

The new view's mAttachInfo == null, so the click not perform.

The code in VIew.java:

public boolean post(Runnable action) {
    final AttachInfo attachInfo = mAttachInfo;
    if (attachInfo != null) {
        return attachInfo.mHandler.post(action);
    }

    // Postpone the runnable until we know on which thread it needs to run.
    // Assume that the runnable will be successfully placed after attach.
    getRunQueue().post(action);
    return true;
}

It return true,so performClick() not excute.

     if (!mHasPerformedLongPress && !mIgnoreNextUpEvent) {
         // This is a tap, so remove the longpress check
         removeLongPress
         // Only perform take click actions if we were in the pressed state
         if (!focusTaken) {
            // Use a Runnable and post this rather than calling
                // performClick directly. This lets other visual state
                // of the view update before click actions start.
                if (mPerformClick == null) {
                    mPerformClick = new PerformClick();
                }
                if (!post(mPerformClick)) {
                    performClick();
                }
            }
        }

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

No branches or pull requests

3 participants