Android: GroupIndicator (Arrow) ExpandableListView not centered

I have been using ExpandableListViews for a while, and it worked fine ... but now I tested my application on different devices, and I noticed that Arrow of Groupelements is not vertically focused on some devices ... Instead, aligned to the bottom of groupItem. .. which looks just bad. I could not find any advice after an hour of searching ... so maybe some of you are faced with the same problem and know what to do to ensure that it looks great with any advice?

here is a screen with off-center arrows. off-center arrows http://img685.imageshack.us/img685/4033/notcenteredarrows.png

Thanks in advance

+3
source share
3 answers

This is a bug in android http://code.google.com/p/android/issues/detail?id=12977

On tablet devices with Android 3.x and 4.x, it is biased. However, it works well on phones with versions of Android 2.1 / 2.2 / 2.3 / 4.0.

+2
source

The only way I know is to use setGroupIndicator with a drawing option that has the correct alignment.

0
source

. , , .

If you use registration or margin within an element of your group, your indicator image will again be centered inside the representation of the elements of the group. My advice would be to create a workaround: if you intend to indent / edge to the top, just add transparency over your image and save it as a scalable graphic with 9 patches. Your indicator image should now have the same height and elevation for 9 graphic patches, so it will adjust the height with its transparent space.

0
source

All Articles