在Android的什么是efficent方式使用活动的 [英] In android What is efficent way for use of Activity

查看:140
本文介绍了在Android的什么是efficent方式使用活动的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想问什么是使用活性有效的方式。平均使用一个活动的多个功能或使用多个活动的每个功能。

在我的应用程序工作的一些事情一样类别 - > subcategory->产品上市。在该方向变化的设计,也需要消耗previous功能状态返回。

In my application working some thing like Category->subcategory->Product listing. In which orientation change design and also need to consume previous functionality state for Back.

感谢

推荐答案

每对于活动文档的活动是一个单一的,集中的一点是,用户可以做的。的。换句话说,你的应用程序的每个不同的屏幕应该是一个活动。

Per the documentation for Activities, "An activity is a single, focused thing that the user can do". In other words, each different screen of your application should be an activity.

你应该有一个活动再present多个屏幕的唯一的一次是,如果它就像一个文件浏览器递归行动;即东西,只是改变显示的数据,但仍显示相同的方式。

The only time you should have an Activity represent more than one screen is if it's a recursive action like a file browser; i.e. something that just changes the data that is displayed, but is displayed the same way.

这篇关于在Android的什么是efficent方式使用活动的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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