pinned-section-listview
pinned-section-listview copied to clipboard
Click on a pinned item, not working properly
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.
i am also facing same problem. mr. han4wluc are you solve the problem?
unfortunately I was not
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.
https://github.com/beworker/pinned-section-listview/issues/49
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();
}
}
}