I am creating a custom ExpandableListView
to support three levels using the tutorial found here.
I have the list working and expanding/collapsing as expected.
The issue I am having is that when a user presses an item, android only recognizes a portion of each item as the clickable area and that area is the only portion that highlights when selected.
If you run the tutorial code, or look at the image below, the Second Level and Third Level backgrounds should take up the full width, just as First Level does.
I have tried setting the LayoutParams
on my TextView
called tv like this:
tv.setLayoutParams(new ListView.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
I want background and highlighting to take up the full width of the view on every level.
All of my code follows the tutorial, but I can post specific pieces if it would help.
EDIT: Added Image