-2

so my app has two tabs

tab 1 is a login page then

tab 2 is a user details

the user needs to loginfrom tab 1 then only details would load from tab 2 so if the user didn't login and goes to tab 2, an alertdialog would show the problem is, after going back to tab 1 and if the user does not login again prior to tab 2, the alertdialog would not show again. I'm not sure if I should use onRestart or onPause or something..

acvon
  • 161
  • 3
  • 6
  • 21

2 Answers2

0

Change Your Application Flow.

make one tab represents a set of activity.

make use of activity group.

Anthony Pegram
  • 123,721
  • 27
  • 225
  • 246
Rohit Sharma
  • 13,787
  • 8
  • 57
  • 72
  • i will javanator! btw, the codes for the tab is as follows is there something i should change? ntent = new Intent().setClass(this, TabOne.class); spec = tabHost.newTabSpec("main").setIndicator("Tab1", res.getDrawable(R.drawable.mainico)) .setContent(intent); tabHost.addTab(spec); – acvon Jul 26 '11 at 10:52
0

SOLVED!

the easiest way to do is to set the flag in the tabhost .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

thanks for the help guys :D

acvon
  • 161
  • 3
  • 6
  • 21