ExpandableListView - group indication is stretch to fit the text size

后端 未结 7 2174
自闭症患者
自闭症患者 2020-12-14 10:36

I have group indication with small icon, and i use groupIndicator to call the selector to draw it but I see android by default stretch that icon to fits the text size

7条回答
  •  自闭症患者
    2020-12-14 11:16

    First of all thank you coderat. Your answer helped me a lot. I recently figured how not only the stretching-problem could be solved but also the problem that the drawable is aligned to bottom/top when the groupItem is bigger in height then the drawable. I just changed the 9patch a bit. This image will also work for all screen-densities (you don't have to create a scaled 9patch for each drawable-folder (hdpi, mdpi,...) ). Hope that helps ;)

    enter image description here

提交回复
热议问题