Discussion Forums  >  Uncategorized

Replies: 2    Views: 184

WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
10/08/11 09:22 AM (14 years ago)

v1.5 Menu button behavior - request for option or change

I have a 1.5 app that has several layers of button menus, as well as a tabbed layout. The behavior I would like to change is this; when a tab button is pressed I would like to have the app go back to the first screen in that respective menu tree. The way it is now, it goes back to the tree but reverts to the last viewed screen. This somewhat defeats the purpose of the tabbed layout in my app, although I see how the current status would be useful in other applications as well. A Return to Top of Menu Tree upon tab selection choice would be great. Thanks again! Tim Wolf
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/09/11 01:22 AM (14 years ago)
Hi..missed this yesterday (travelling this week)... I understand what you're asking, it makes sense in some situations. It goes against the grain a bit but no worries. In iOS (not sure if you're workign in iOS or Android this time, Android I think?) each tab maitaines a list of screens. For a 5 tabbed app, iOS would maintain 5 different lists. This makes it easy to jump any screen in the list. iOS calls this method 'pop view controller' or 'push view controller.' They are accessed by index. You can also do a 'pop to root view controller' meaning go back to the first screen (the tabs home screen). This is what you're asking. Go to the tabs home screen when a tab is selected regardless of where the user was when they left off. In Android it's a bit different. There isn't a built in method to 'jump to the home screen' of a tab. It's kinda funky but does make sense once you get the hang of it. This means to take a tab back to it's home screen in Android you'll end up creating and launching a new Intent. The Intent (screen) will be created with the tabs original home screen data. The good news, the v1.5 app already is tracking what screen is the tabs original home-screen so loading it shouldn't be that tough. BT_activity_root_tabs.java handles this in Android. Have a look at the onTabChanged() method on about line 176 if you want to mess around a bit? In iOS it's the BT_rotatingTabBarController.m file and the app's delegate file that handle this. I've added to the wish list so we can get an option on the control panel that would read 'jump to home on selection' or something like that. Makes perfect sense.
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
10/09/11 08:56 AM (14 years ago)
Thanks Dave!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.