ExpandableListView sample from Google

前端 未结 2 2046
独厮守ぢ
独厮守ぢ 2020-12-31 17:52

I just tried the current Google sample for ExpandableListiew:

This sample seem very simple and easy to use, but what I would like to do is to say that one of the cat

2条回答
  •  太阳男子
    2020-12-31 18:14

    If you're talking about the arrow that is used to collapse/expand the list then you can remove it by using setGroupIndicator()

    in the activity you can call

    getExpandableListView().setGroupIndicator(null);
    

    that will remove the arrow permanently though. If you want to only hide it if the list is empty you can do it through xml attributes like this

    To launch an activity when the list is expanded/collapsed you can override onGroupExpanded (or collapsed) in your ListAdapter implementation and used that to fire up your activity

提交回复
热议问题