How can i set the first item is expand by default?
How can i set the first item is expand by default?
With the current API there is no way to set an expanded item by default. The best you can do is expand the item manually or create a custom SaveState with an appropriate bitset and lastExpandedItem of 0.
On Thu, Apr 10, 2014 at 12:29 AM, akira [email protected] wrote:
How can i set the first item is expand by default?
Reply to this email directly or view it on GitHubhttps://github.com/tjerkw/Android-SlideExpandableListView/issues/71 .
Hi expand by default is possible. Just add this code from your AbstractSlideExpandableListAdapter.java
public AbstractSlideExpandableListAdapter(ListAdapter wrapped) { super(wrapped); lastOpenPosition = 0; openItems.set(lastOpenPosition, true); }
If you added this code, then your first item is expanded by default.
thanks @JesseFarebro @SathishAndroid :D