活动主场迎战片段实施主场、片段

由网友(人气妹儿)分享简介:我有一些麻烦活动和片段工作。我公司在应用开发的早期阶段,我最终寻找到设计集成了两个单独的屏幕的最有效的方式。I am having some trouble working with Activities and Fragments. I am in the early stages of app developme...

我有一些麻烦活动和片段工作。我公司在应用开发的早期阶段,我最终寻找到设计集成了两个单独的屏幕的最有效的方式。

I am having some trouble working with Activities and Fragments. I am in the early stages of app development and am ultimately looking to design the most efficient way of integrating two separate screens.

第一个屏幕将是闪屏,这将present用户与标志,输入用户信息,并登录通过数据库或与Facebook的能力。这里也将提供一个按钮,允许注册应用程序的用户。

The first screen would be the "Splash Screen", It would present the user with the Logo, the ability to enter user information and sign in through either a database or with Facebook. There would also be a button available to allow the user to register for the app.

第二个屏幕将允许用户建立一个帐户通过定义自己的用户信息,包括登记按钮,也是一个与Facebook按钮连接。

The second screen would allow the user to set up an account by defining his user information and would include a register button and also a connect with Facebook button.

我想知道大家都会主动手头的工作,因为我最初所设计的应用程序指定2活动来处理每个屏幕。最近,我切换到能承载的屏幕为2片段在1活动。

I would like to know how everyone would approach the task at hand as I had initially designed the app designating 2 Activities to handle each screen. Recently, I have switched to being able to host the screens as 2 fragments under 1 Activity.

什么是每一种方法的好处和它的设计,你会选择?

推荐答案

片段主要是为让您在大幅面设备上显示两个独立的用户界面并排侧。碎片可以结合code和UI在一个单一的布局,它们还允许非UI活动,但主要是他们给你的灵活性,表示安装一个活动的各种意见。

Fragments are mainly for allowing you to display two separate UIs side-by-side on large-format devices. Fragments can combine code and UI within a single layout, and they also allow non-UI "activities", but mostly they give you flexibility in showing the various views attached to an activity.

我会选择2的活动,因为你描述的是操作的进程,而不是多个视图成相同的操作。

I'd choose 2 activities, since what you're describing is a progression of operations rather than multiple views into the same operation.

阅读全文

相关推荐

最新文章