1

I'm in this situation that i need a list of lists.

for instance i want to display a list of departments and in these departments there are employees:

Dep 1:

Employee 1
...
Employee N-1

Dep ...

Dep N - 1:

Employee 1
...
Employee N-1

any idea how to make this? (sorry for the bad english)

1

4 Answers 4

1

You should try this by implementing an Expandable ListView.. Refer this link

Sign up to request clarification or add additional context in comments.

Comments

1

what you need is custom list adapter or you can use ExpandableListView widget.

Comments

1

are you talking about an android ListView inside another listview

read about custom list adapter.. and find there you can paas list of departments in there..which would populate single view in getView() as list(custom list adapter by passing employees list) of employees in it.... but make sure if this flow on user screen will be acceptable to you or not...i.e. list view inside a list view... might be little confusing from user's perspective

Comments

1
  1. you can have a list with your departments and if one of the departments is clicked you just open a new Activity/show a new Fragment with the corresponding list of employees.

  2. try an expandable listview, there is a good example in the api-demos

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.