If I use the default group indicator (not setting a new one), how can I know the padding width for the layout of groupview?
So can let my layout won't overlap with the group indicator.
Is that possible? Because I can't find a method to getGroupIndicator. Or I must have to set a new one that I know its size.
I found the attribute here:
android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft"
Or you can use reflection:
Field field_mIndicatorRight = listView.getClass().getDeclaredField("mIndicatorRight");
field_mIndicatorRight.setAccessible(true);
int mIndicatorRight = (Integer) field_mIndicatorRight.get(listView);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With