Discussion Forums  >  Uncategorized

Replies: 5    Views: 232

Goeshi
Aspiring developer
Profile
Posts: 18
Reg: Nov 01, 2011
Cirencester
180
12/21/11 09:22 AM (14 years ago)

Auto-refresh tabs in tabbed layout?

Hi there, Is there any way to automatically refresh tabs when using the tabbed layout? ie revert them back to their original start-up state when you cycle through them? At the moment my app is remembering the last screen the tab was left on and going back to it. This app is going to be used on an exhibition stand so i need the content to refresh to avoid confusing a would-be user who at the moment will be dropped in where the last person left off. I hope i've explained my situation sufficiently clearly. Thanks in advance for any help. Goeshi
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
12/21/11 11:43 PM (14 years ago)
Hi @Goeshi, I think this will depend on which screen type you have associated with that tab. Many of the tabs have a Force Refresh option that can be found in the Advanced Screen Properties section for that screen. Set it to Yes, and it'll refresh the screen each time it loads. Hopefully that helps! Mark
 
Goeshi
Aspiring developer
Profile
Posts: 18
Reg: Nov 01, 2011
Cirencester
180
like
12/22/11 01:30 AM (14 years ago)
Thanks for your help Mark. The force-refresh option only seems to be there on document screens though and not menu screens. The problem i have that the tabs I'm using initially navigate to a menu screen which has sub-menus attached to it (the app is a glorified filing system for brochures and product information). When switching between tabs the app is returning to the screen a particular tab was left at previously, and instead i'd like it to return to the top level menu that opens on start-up. Is there any way to do this? Essentially i'd be refreshing the tree attached to the tab rather than the individual screens within it. Thanks, Goeshi
 
Goeshi
Aspiring developer
Profile
Posts: 18
Reg: Nov 01, 2011
Cirencester
180
like
01/09/12 05:07 AM (14 years ago)
Shameless bump sorry but has anyone figured out a way to do this?
 
IELTStestONLINE
Aspiring developer
Profile
Posts: 30
Reg: Oct 28, 2011
Auckland
300
like
01/11/12 06:48 AM (14 years ago)
Another thread to keep an eye on - would be really interested in this feature too :)
 
frontrunner_tech
Code is Art
Profile
Posts: 20
Reg: Apr 04, 2011
Dickinson
2,850
like
03/31/12 10:34 AM (13 years ago)
I'm embarrassed to admit how much time I spent on this. I really need to try building an app from scratch so I can better understand what's going on here. I do not know if this is okay to do, all I know is that it works for me. I'm using self-hosted Buzztouch. My tabs use Custom URL screens and I need them to refresh when I change tabs. I'm not sure how this will work for other types of screens, but here's what I did: Open BT_activity_root_tabs.java. Go to line 319: spec.setContent(intent); Change it to: spec.setContent(intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)); If I'm on tab 0, I switch to tab 1 and it loads. When I switch to tab 0, tab 0's content refreshes. When I switch to tab 1, tab 1's content refreshes. As I was stepping through the code, I found something else that may or may not be related: On lines 186-190: if(tabId == "0")... These statements never return true. Should be tabId.equals("0").
 

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.