开发者

Finish activity from activity group

I h开发者_Go百科ave a problem look like this. I have 5 activity group and 1 tabHost with 5 tab and every tab is attached with one activity group. In each activity group a Login activity. Condition-: 1-When we tap with in 1,2,3,4 and 5 tab the Login activity is show.//according to requirement. 2-After login another activity is start and these activity add in activitygroup.

Problem-: When we press back button after login the the login form is show i want to remove it after login. I have use all the finishing method provided by android sdk like finish(),finishFormChield() and other also. I am in problem please help me. I hope any good programmer give me help ASAP.


In the login activity when you start intent, immediately include finish(). This kills the present activity as shown below:

Intent intent = new Intent(first.java,second.class);
startActivty(intent);
finish();

You can also try with including android:launchMode="singleInstance" in your android manifest file for the activty as shown below:

single instance activity

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜