完成活动组中的活动
我有一个问题,看起来像这样。我有 5 个活动组和 1 个 tabHost,其中有 5 个选项卡,每个选项卡都附加一个活动组。每个活动组中有一个登录活动。
条件:
- 当我们点击 1、2、3、4 和 5 选项卡时,将显示登录活动。//根据要求。
- 登录后,另一个活动启动,这些活动添加到活动组中。
问题:
当我们登录后按后退按钮时,会显示登录表单,我想在登录后将其删除。我已经使用了 Android sdk 提供的所有整理方法,如 finish()、finishFormChield() 等。
I have 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:
- When we tap with in 1,2,3,4 and 5 tab the Login activity is show.//according to requirement.
- 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 others also.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在登录活动中,当您启动 Intent 时,立即包含 finish()。这会终止当前的 Activity,如下所示:
您还可以尝试在该 Activity 的 Android 清单文件中包含 android:launchMode="singleInstance",如下所示:
单实例活动
In the login activity when you start intent, immediately include finish(). This kills the present activity as shown below:
You can also try with including android:launchMode="singleInstance" in your android manifest file for the activty as shown below:
single instance activity