如何在Android开放新的屏幕? [英] how to Open new screen in Android?

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

问题描述

我是新来的Andr​​oid和我已经verifing登录后创建一个登录页面

i am new to android and i have created a login page after verifing login

我得到的结果真或假的用户身份认证的基础,现在我的目标是展示在认证成功的另一个屏幕,一些新的文本框和按钮,我的意思是新的布局,如何实现这一目标???

i get results true or false on the bases of user authentication now my goal is to show another screen on successful authentication with some new textboxes and button i mean new layout how to achieve this???

任何帮助将appriciated。

any help would be appriciated.

推荐答案

您需要启动新活动。您可以在启动新的活动的Andr​​oid文档更多。

You want to start new activity. You can read more on initiating new Activities at Android documentation.

然而,你可以考虑做一个正常的应用程序界面,并调用一个登录页面,重定向的另一个活动进行登录,而不是。

However you might consider making a "normal" application screen and call another Activity for login purposes instead of having a login page and redirection.

因此​​,如果页/ Activity_A需要用户先登录,您拨打的 LoginActivity 的有<一个href="http://developer.android.com/reference/android/app/Activity.html#startActivityForResult%28android.content.Intent,%20int%29">startActivityForResult并获得真/假,如果用户正确登录。

So if page/Activity_A requires user to be logged in, you call LoginActivity with startActivityForResult and get true/false if user has properly logged in.

这篇关于如何在Android开放新的屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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