开发者

How to transition between Activity classes in Android? [duplicate]

This question already has an answer here: Closed 11 years ago.

Possible Duplicate:

How to save user state in Android?

My application's first activity is login1 in which i am asking user to enter password,confirm password,security question and answer(security question and answer is taken in case of retrive password to user in the form of sms or email.)

second activity is login2 having only one field to enter that is password.

third activity is main activity of my application that is setting.

Now 开发者_开发百科the question is that when user enters information of all fields which are in first activity login1 then he should move to directly to setting activity.

if user close application after setting password and open it again he must get second activity that is login2 where he just have to enter password to login.

if he remove that application from phone and then install again he must get first activity that is login1 .

So tell me code for doing it .please replay.


You could add a 0th activity to your list as a splashscreen, or license agreement, or something, and there you could write code to chose proper activity (1st or 2nd).
Or you can merge 1st and 2nd activities to a single activity with the help of ViewFlipper and write your "choose code" there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜