I am desperately trying to fix this problem when my ListView items are highlighted. I looked through any solution I could find here on stackoverflow, and did not find any that worked for me.
The first is the ListView in LinearLayout in the ViewPager in LinearLayout.
Each element in this view is a LinearLayout containing a LinearLayout (containing a TextView) and a gallery. The gallery contains several LinearLayouts containing TextView and Imageview in FrameLayout.
This problem does not occur when you click, but when you drag it, as when scrolling your finger through the history (sometimes when the ListView scrolls with your drag and drop) the item under it is selected. In addition, this particular problem only occurs on devices where the scroll effect does not cause a rebound when scrolling.
Attempts to solve the problem are as follows:
- Set list selector to background color in XML (Fail)
- Set List to Alpha # 00000000 in XML (Fail)
- Higher but programmatically
- Above, but on the topic
- Code that sets the selection to -1 onListItemClick
- Removing the background from a LinearLayout list item (works in version 4.0)
- Setting
android:cacheColorHint
to #00000000
(does nothing?)
Any help would be greatly appreciated. I just can't understand why he is doing this, and I really need him to stop.
source share