Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i set the first item is expand by default? #71

Open
liuzhitao2000 opened this issue Apr 10, 2014 · 3 comments
Open

How can i set the first item is expand by default? #71

liuzhitao2000 opened this issue Apr 10, 2014 · 3 comments

Comments

@liuzhitao2000
Copy link

How can i set the first item is expand by default?

@JesseFarebro
Copy link
Contributor

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//issues/71
.

@SathishAndroid
Copy link

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.

@liuzhitao2000
Copy link
Author

thanks @JesseFarebro @SathishAndroid :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants