android - Header of AmazingListView not getting touch events -


i adding header amazinglistview (using latest code):

mamazinglistview.setpinnedheaderview(headerview); 

headerview contains elements user should able interact including button , horizontallistview. when user attempts touch button or scroll horizontallistview, touches not appear reach view elements not respond.

i have tried adding headerview simple inflated view:

 view headerview = minflater.inflate(r.layout.header_view, mamazinglistview, false); 

and fragment - placing embedding fragment in layout file, inflating file, , fetching fragment tag.

 headerview = minflater.inflate(r.layout.header_fragment_wrapper, mamazinglistview, false); 

in neither of these cases touches registered. if embed fragment directly in view, able receive touch events think embedding of view within header of amazinglistview absorbing touches @ non-desired place.

calling setfocusable(true) on headerview did not help.

i'm afraid you're trying not possible using amazinglistview. if inside amazinglistview:

@override protected void dispatchdraw(canvas canvas) {     super.dispatchdraw(canvas);     if (mheaderviewvisible) {         drawchild(canvas, mheaderview, getdrawingtime());     } } 

amazinglistview draws header, not added heirarchy element. therefore, not receive touches expected.


Comments

Popular posts from this blog

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -