How to implement Nested Lists in TabHost

ckapucu

Member
Licensed User
Longtime User
Hi, i started to examine Basic4android 2 days ago. I liked it, beacuse i could do many things in hours instead of weeks with ST2. Now i want to migrate one of my app to b4a. I attached a picture about screen flow instead of writing many words. There must be a tabhost with 3 tabs, and a listview on every tab. When i clicked an item on List 1 for example, it must be pass a parameter and populate another list (List 1-2) depend on the clicked item value of List 1. Then if i click an item on List 1-2, it must bring the detail screen about clicked item on List 1-2. And it's not finished yet, whenever it's possible i should be able to go bac tot the previous screen/list with a back button (on the left top). How can i do this? I managed to populate listviews on tap pages, but how can i populate a secondary list depending on the primary list and can i put two or more listviews one on a tab page in a tabhost?
screen flow.png
 

ckapucu

Member
Licensed User
Longtime User
Is this the only way?
If i use buttons side by side instead of tabhost, can i have these buttons always on the same place on screen with different activities? Or should i use different layouts but one activity? In sample projects like two activities or three activities, the navigation components are shown only on the first activity. Sould i put same buttons on every activities for the same effect?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
If i use buttons side by side instead of tabhost, can i have these buttons always on the same place on screen with different activities?
It depends on how you want to navigate.
In the three activities example the user selects a page and with the back button goes always back to the main activity.
If you want to go back and forth you need buttons and event routines in each activity.
Do you have other views on the activity ?
Or should i use different layouts but one activity?
In your case you should consider using one activity with the navigation buttons and set the different ListViews visible or not.
How many linked ListViews do you have ?
You could also put several ListViews on one page.

Best regards.
 
Upvote 0
Top