tjerkw / Android-SlideExpandableListView

A better ExpandableListView, with animated expandable views for each list item
Apache License 2.0
1.98k stars 741 forks source link

how to do with the expandable_button #108

Open tracy1allen3 opened 8 years ago

tracy1allen3 commented 8 years ago

my expandable_button is a image arrow, when i click it , i want to change the it and set another arrow. like: < to >, or : ^ to > , etc how can i do ?

chenchongyu commented 8 years ago

My solution like this. Defined a view extends ImageView called ToggleExpandableMenuButton,There is an interface in it. public interface ToggleListener { void toggle(); } Override the method performClick(){ if (listener != null) { listener.toggle(); } }

And set a ToggleListener on your ToggleExpandableMenuBotton in your adapter. If I don't talk it clear ,download the attachment and change the suffix to '.java' or leave ur email here. toggleexpandablemenubutton