I have a list of categories and subcategories and items under each category individually and also items under the subcategories. I would want to display this in a sliding layer , such that it only occupies a certain portion of the screen, with the main screen still visible.

I have looked at the expandable list view and also tree-node structure and also gone through this

I even tried implementing my own expandable listview that extended to n-levels , was successful too but then the situations changed now. I was using POJO classes that had the relationships defined inside them that is subcategories iterating through the category POJO. But i am now using a cursor. It is possible to use cursors with expandable listviews, but never tried with n-level expandable list view. It would un-necessarily increase the number of queries to be made.

Could i have some clue as to where to begin from? The tree-node example is good but then it has the parent levels and all defined before head, while in my case, it may vary . multiple panels will not suit the requirement since multiple clicks and also space has to be considered.

  • Targetting Android mobile? Commented Nov 5, 2013 at 22:28
  • currently yes just the android mobile..
    – DSS
    Commented Nov 6, 2013 at 3:57
  • Perhaps you could rephrase your questions with screenshot examples? Not quite sure what you're asking.
    – abhinavc
    Commented Feb 2, 2014 at 21:25

1 Answer 1


I actually had a similar problem one way of solving this is with spinners.

enter image description here

This screenshot doesn't actually explain entirely what I mean; what I'm thinking you could do instead is something like this:

[spinner](category) - default is all

on click the sub-category appears below and you can simply dive deeper.


[SUBMIT BUTTON]  the button to perform the action should always be present, 
to allow the user to go through at anytime; of course you could toggle the state 
to force the user to hit a certain level
  • Hi, thanks for the reply :).. Yes, i tried it with spinners too, i do get the solution, and +1 for this answer cz i know it works, but i seem to be a little keen on expandable listview and tree view,since in the case of spinners, i have to maintain the stack or something of the same to identify if its the category spinner currently in the view or if its the sub_item spinner, and if sub-item spinner i need to keep track of the levels its reached,since this is all about n-level :)
    – DSS
    Commented Mar 28, 2014 at 4:23

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.