We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No description provided.
The text was updated successfully, but these errors were encountered:
public void setOnItemClickListener(final PinnedHeaderListView.OnItemClickListener listener) { super.setOnItemClickListener(new android.widget.ListView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int rawPosition, long id) { PinnedBaseAdapter adapter; if (adapterView.getAdapter().getClass().equals(HeaderViewListAdapter.class)) { HeaderViewListAdapter wrapperAdapter = (HeaderViewListAdapter) adapterView.getAdapter(); adapter = (PinnedBaseAdapter) wrapperAdapter.getWrappedAdapter(); } else { adapter = (PinnedBaseAdapter) adapterView.getAdapter(); } rawPosition = rawPosition - getHeaderViewsCount(); if (rawPosition < 0||rawPosition >= adapter.getCount())//if have headerViews or FooterViews They didn't click event return; int section = adapter.getSectionForPosition(rawPosition); int position = adapter.getPositionInSectionForPosition(rawPosition); if (position == -1) { listener.onSectionClick(adapterView, view, section, id); } else { listener.onItemClick(adapterView, view, section, position, id); } } }); }
Sorry, something went wrong.
You saved my day. Thanks!
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: