eclipse 在 Android 上创建设置向导

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14789905/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:58:32  来源:igfitidea点击:

Creating setup wizard on Android

javaandroideclipseuser-interfacewizard

提问by MikkoP

In my application I need to ask the user some information in the beginning. Like Google asks users when they first launch the phone.

在我的应用程序中,我需要在开始时询问用户一些信息。就像谷歌在用户第一次启动手机时询问他们一样。

Using Java and Android, how do I make the same kind of setup wizard for my application? 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.

使用 Java 和 Android,如何为我的应用程序制作相同类型的设置向导?我可以创建多个活动,当移动到向导中的下一页时,我会启动它。这似乎不是一个好方法。

I'd like to use Eclipse's GUI builder to design it.

我想使用 Eclipse 的 GUI 构建器来设计它。

回答by Leandros

回答by AhmedRed

The best way to do this is using Shared Preferences in android. http://developer.android.com/reference/android/content/SharedPreferences.htmlYou just need to check if the value is not already set then show your setup wizard else proceed straight to the application.

最好的方法是在 android 中使用共享首选项。 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。