Android: AmazingListView Pinned Header is Untouchable
android, button, listview, togglebutton
Solution
I am having the same problem with this component. In my case the pinned header is a relativelayout that has a button that I need to use. The actual problem lies in the way the pinned header is added to the listview. It is "drawn" rather than added to the listview hierachy:
@Override
protected void dispatchDraw(Canvas canvas) {
super.dispatchDraw(canvas);
if (mHeaderViewVisible) {
drawChild(canvas, mHeaderView, getDrawingTime());
}
}
mHeaderView is never added to the view hierachy...
I don't know if it is possible for views that are "drawn" this away to receive any user input.
Maybe we need to work out a way to implement the pinned header by adding it to the view hierachy...
Problem
I have a project that uses AmazingListView: https://code.google.com/p/android-amazing-listview/ I need for the pinned header to have a clickable button. However, it appears that the pinned header for some reason can't receive any touch events. What do I have to do make this button clickable? Is there some way to intercept the events and send them to the header? Thanks!