[英]Creating setup wizard on Android
In my application I need to ask the user some information in the beginning. 在我的应用程序中,我需要在开始时询问用户一些信息。 Like Google asks users when they first launch the phone. 就像Google首次推出手机时询问用户一样。
Using Java and Android, how do I make the same kind of setup wizard for my application? 使用Java和Android,如何为我的应用程序创建相同类型的设置向导? I could create multiple activities and when moving to the next page in the wizard I'd launch that. 我可以创建多个活动,当移动到向导的下一页时,我会启动它。 That doesn't seem a good way to do it. 这似乎不是一个好方法。
I'd like to use Eclipse's GUI builder to design it. 我想使用Eclipse的GUI构建器来设计它。
Creating a wizard is explained here, also: https://plus.google.com/113735310430199015092/posts/6cVymZvn3f4 此处说明了创建向导,另请参阅 : https : //plus.google.com/113735310430199015092/posts/6cVymZvn3f4
You can get the code here: https://github.com/romannurik/android-wizardpager 你可以在这里获得代码: https : //github.com/romannurik/android-wizardpager
The best way to do this is using Shared Preferences in android. 最好的方法是在android中使用共享首选项。 http://developer.android.com/reference/android/content/SharedPreferences.html You just need to check if the value is not already set then show your setup wizard else proceed straight to the application. http://developer.android.com/reference/android/content/SharedPreferences.html您只需检查该值是否已设置然后显示您的设置向导,否则直接进入该应用程序。
You can also show the wizard in dialog box or the other way is just develop a separate activity along with UI. 您还可以在对话框中显示向导,或者另一种方式是与UI一起开发单独的活动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.