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
how can i prevent that behavior, and display the icon with it’s original size ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can add group indicator by setGroupIndicator method. But By default, Android stretch height of indicator to fit group item’s height. (width can be adjusted by setIndicatorBounds method.)
Therefore, you should make group indicator’s height exactly same as group item’s height.
(see ExpandableListView)
Otherwise, you can make fully customized group indicator with onGroupCollapsed and onGroupExpanded methods. Just make a view with some states and When these methods are called, change your view’s state. (see ExpandableListAdapter)