Yet Another expandable list question


Last Updated:

  1. superseed77

    superseed77 New Member This Topic's Starter

    Joined:
    Jul 6, 2010
    Messages:
    3
    Likes Received:
    0
    Hi all

    I'm pretty new in android dev but I crawled forums and I still can't find any clear answer to this question:

    How to do an expandable list where the indicator arrow to expand the list is hidden if there's no child

    In my project I also need to expand when ones click on the arrow (if exits) but call an another activty when ones click on the title of the Item

    0


    I've created my own expander_group.xml
    with

    item
    android:state_expanded="true"
    android:state_empty="true"
    android:drawable="@drawable/empty"


    and set it up in my ExpandableListActivity

    Code (Text):
    1. Drawable icon = this.getResources().getDrawable(R.drawable.expande   r_group);
    2.     getExpandableListView().setGroupIndicator(icon);
    Icon are loaded but no empty icon in front of empty group till I tried to expand it. When I click on it it actually disapear as it should be


    Someone told me about BaseAdapter and writing all the views by hand

    What is the best way to acheive that : no icon for empty groups and
    title of the group clickable




    Please Help!
     

    Advertisement

Share This Page

Loading...