StickyListHeaders
StickyListHeaders copied to clipboard
setOnItemSelectedListener not implemented
Hi,
In regular list view there is * Register a callback to be invoked when an item in this AdapterView has * been selected. * * @param listener The callback that will run */ public void setOnItemSelectedListener(OnItemSelectedListener listener) { mOnItemSelectedListener = listener; }
since StickyListHeadersListView not extend ListView but FrameLayout therefore this method not accesable. Could you please add to StickyListHeadersListView.java
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
mList.setOnItemSelectedListener(listener);
}
Hi
I have been struggling with the same issue.
You can access the internal ListView with stickyListView.getWrappedList() and register a listener on it.
This will be the solution
stickyListView.getWrappedList().setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {}
@Override
public void onNothingSelected(AdapterView<?> parent) {}
});