I am working on creating a scroll list view adapter. My main methodology is to wrap the view of the list item as a second view in the ViewPager and provide the necessary callbacks in the change listener of the ViewPager items. Due to the great pain, I have a working View examiner, as expected, as well as the ViewHolder and ViewBinder templates. I even managed to keep the ListView from capturing touch events while scrolling through the ViewPager without having to create a custom subclass of ListView (I can do all this from the adapter).
When I OnItemClickListener into difficulties, you will get a selector and OnItemClickListener . Looking at the source of the ListView, it seemed that by overriding the ViewFager hasFocusable () method to always return false (later I pulled this value from the child view), these things should have been re-enabled. Unfortunately, this is not the case. I tried the setDecendantFocusability() workaround and I am still stuck.
I would like to avoid the ListView extension, if possible, provide the maximum degree of modularity. For similar reasons, I do not want to add a selector to the background of the ViewPager (if dev changes the ListView selector, this will not be reflected). Essentially, I'm looking to make the ViewPager code transparent between a ListView and a child view. Any ideas?
android android-viewpager listadapter
keyboardr
source share