1

My situation is as follow:

I want to know if it is possible to have an (Custom) ListView with an linear layout in it, where in the Linear layout another ListView. What I want to accomplish is an List of object with in it an list of object with an list of object. That means that the list goes 3 category(level) down. Company have several Establishments in it and Establishment have several Departments in it. I will try to sketch it.

[ Company] //ListView
    [Layout]
        [ Establishment]  //ListView
            [Layout]
                [Department]//ListView
                [Department]
            [/Layout]
        [/ Establishment]
    [/Layout]
[/ Company]

I have a main class and an Adapter class for every Object (Company, Establishment and Departments).

I know how to make an ListView and retrieve data to display it in the ListView. But I don't know yet how to use it when you have to go down in hierarchy of another ListView or when you have ListViews that relates to each other. Maybe I should use an Expandable ListView(But I don't want the collapse/expand behavior) It have to look like a ListView, maybe an Linear layout that behave like an ListView. Or use section headers to present the data as I want to.

Well on my question I ended up using an ExpandableListView with an GridView.

  • 1
    Your question isn't specific enough (in my opinion). – keyser Oct 02 '12 at 08:16
  • 2
    check this link: http://stackoverflow.com/questions/3271772/android-treeview – Tamir Scherzer Oct 02 '12 at 08:20
  • @Keyser thanks for the reply, I just want to have a ListView-like(that goes 3 levels) layout. That behave like an ExpandableListview but looks like ListView. I don't want it to collapse/expand or have the arrows on the left. – user1693108 Oct 02 '12 at 08:46

0 Answers0