A few ideas to get you started:
Instead of using
ListView
, take a look atGridView
. ListView does not support more than one column (you have to support that manually) and GridView was introduced for this purpose.Let's assume your initial list is shown in its own activity. This means you have an activity which queries the webservice on its
onCreate()
and then displays the results in the ListView/GridView when they are returned asynchronously from the webservice.It will be convenient to hold the submenu in its own activity. This means you should create another activity for the submenu (maybe it can share code with the first one or even be derived from it to reduce code duplication). This activity will receive in its
Intent
an argument (take a look atIntent.putExtra
andIntent.getExtra
) which tells it which row was clicked (it should usually contain the String filter you are about to pass to the webservice). Once this activity is created, in itsonCreate
it should query the webservice much like the first activity and show its results in its own ListView/GridView.To connect the two activities you'll need to catch the on click event in the first activity, figure out which row was clicked, and then create an
Intent
to show the 2nd activity, pass the extra and show it.This approach will let the user dismiss the 2nd activity using the back key once they're finished with it. Once it's dismissed, the user will be returned to the 1st activity where they can click on a different row.