有一次,Android的设置屏幕? [英] One time Android setup screen?

查看:105
本文介绍了有一次,Android的设置屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建我的Andr​​oid应用程序设置活动而我的用户将看到他们第一次打开应用程序,但从来没有一次,除非他们想重新设置。如何创建这个设置活动的第一个活动,但没有为其主/ LAUNCHER意向过滤器? (我想用那些我家的活动。)

I'm trying to create a setup activity for my Android application which my users would see the first time they opened the app, but never again unless they wanted to redo the setup. How do I create this setup activity as the first activity without giving it MAIN/LAUNCHER intent-filters? (I want to use those for my home activity.)

推荐答案

如果一个活动的onCreate方法启动另外一个活动,它看起来好像第一个活动不显示。

If the onCreate method of an Activity launches another activity, it appears as though the first activity doesn't show.

所以,让你真正的第一个活动主/发射活动。

So, make your real first activity the main/launcher activity.

在首先活动的onCreate方法有什么设置的配置应该是present的支票。

In the onCreate method of that first activity have a check for whatever setup config should be present.

如果未配置设置,启动安装程序的活动。

If the setup is not configured, start up the Setup activity.

另外,第一项活动将展示。

Otherwise, the first activity will show.

这篇关于有一次,Android的设置屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆