How can I increase the width of the indicator of the ExpandableListView group on Android?

If I use the default group indicator (without setting a new one), how do I know the fill width for a groupview layout?

So let my layout not overlap with the group indicator.

Is it possible? Because I cannot find the getGroupIndicator method. Or should I install a new one that I know its size.

+5
source share
2 answers

I found the attribute here:

android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft"
+13
source

Or you can use reflection:

Field field_mIndicatorRight = listView.getClass().getDeclaredField("mIndicatorRight");
field_mIndicatorRight.setAccessible(true);
int mIndicatorRight = (Integer) field_mIndicatorRight.get(listView);
+1
source

All Articles