1. Check out our companion app, Forums for Android! Download from Google Play

Yet Another expandable list question

Discussion in 'Application Development' started by superseed77, Jul 6, 2010.

  1. superseed77

    superseed77 New Member
    Thread Starter
    5

    Jul 6, 2010
    3
    0
    5
    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...