Filnik Filnik - 1 year ago 106
Android Question

Put on the right the indicator of an ExpandableListView in Android


I have to move the indicator from the left to the right (because of the plane image). I couldn't succeed also because the expandableviewlist is inside a fragment and not inside a whole activity. Any idea? Thanks!

Answer Source

I don't know a way to do that from XML but i'll tell you a way to do so dynamically in your adapter.

First you have to remove group indicator from your xml

 <ExpandableListView [...] 
    android:groupIndicator="@null" />

Then in your layout of the parent add an imageview in the right position of your layout.

Then in your custom adapter do the following

public View getGroupView(int groupPosition, boolean isExpanded,
        View convertView, ViewGroup parent) {

    if (isExpanded) {
    } else {

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download