使用对话框的VS活动 [英] Use of Dialogs vs Activities

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

问题描述

在机器人的开发,其中,与用户的弹出相互作用是必需的 人们可以在大多数情况下使用一个对话或活性。 剔除极端情况下,选择很容易,我想知道 您的想法是prefered。

In android development, where a pop-up interaction with a user is required one can use in most situations either a "dialog" or a "activity. Excluding extreme cases where the choice is easy, I would like to know your ideas on which is prefered.

有关前。可以说,在屏幕上的方向是失去了一个对话框,用户 必须做同样的互动得到它,而活动仍留在原位 (当然,它是创造了,但还停留在它的位置在能见度栈)。

For ex. one might say that on screen orientation a dialog is lost and the user will have to do the same interaction to get it while an activity stays in place (of course it is "created" again but still stays in its place in the visibility stack).

我想为这两种情况下,所有可能出现的问题(性能,副作用, 用户交互的问题,等等...)。

I would like all possible issues for both cases (performance, side-effects, user interaction issues, etc...).

推荐答案

如果你有一个节省时间的任务,它要求用户的关注(因为您无法访问状态栏的内容),那么你应该用对话,恩,输入登录名和密码等。

If you have a less time consuming task and which requires user attention (because you can not access the status bar contents), then you should use dialog, ex, enter the login name and password etc.

对话框缺点:

  1. 您无法处理任何配置更改,比如定向,语言的变化等。
  2. 没办法保持状态,就像无法导航到另一个画面,回来
  3. 在性能方面,只能是被创造出来的东西对话框所有的时间
  4. 在无法访问全屏
  5. 将无法使用任何意图
  6. 来启动它

这篇关于使用对话框的VS活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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