我需要选择是否应该运行一项或另一项活动取决于授权。如果您在AccountManager中没有帐户我想在其他情况下显示RegistrationAcitivity我想要显示LoginActivity。什么是最好的模式呢?我需要把正在检查的代码放在哪里?在其中一项活动中?Android活动选择
0
A
回答
1
您可以检查条件是用户已经注册,然后移动到AccountManager。
Intent intent = new Intent(this,AccountManager.class);
startActivity(intent);
如果没有的话重定向他RegistrationAcitivity
Intent intent = new Intent(this,RegistrationActivity.class);
startActivity(intent);
对于您可以设置标志。
或存储数据无论是在SharedPreferences或数据库
0
你可以把注册活动代码,检查账目那里如果有重定向他登录activtiy
相关问题
- 1. android选择两个开始活动
- 2. 活动中的Android选择标签
- 3. 将Android图像选择为活动
- 4. 选择从Android的活动堆栈specfic活动
- 5. 活动未列在活动选择器
- 6. Android:动态选择启动活动并不总是有效
- 7. 加权活动选择
- 8. Bootstrap Scrollspy活动选择器
- 9. 选择下一个活动
- 10. 选择性活动记录
- 11. 轨活动记录选择
- 12. 如何选择活动层?
- 13. Android动作选择器 - 如何处理活动内的意图?
- 14. Android选项卡活动
- 15. 在jQuery Mobile中选择活动选项
- 16. 选择活动选项卡按日期
- 17. 动态规划 - 活动选择
- 18. 在启动时选择活动
- 19. Rails:动态选择活动记录
- 20. 动态android选项卡活动
- 21. 不要保持活动+ Android的电话号码选择
- 22. Android铃声选择器刷新活动,为什么?
- 23. Android猴子测试选择一个特定的活动
- 24. Android菜单项目选择开始活动
- 25. 显示从其他活动中选择的点的Android地图
- 26. 在android源代码中获取选择器活动名
- 27. 在同一活动中的两个日期选择器android
- 28. 如何根据Android中的条件选择开始活动
- 29. Cal droid Calender在android活动中用作日期选择器
- 30. 从活动中选择图像并显示在片段android