使用对话框的VS活动对话框、VS

2023-09-12 05:11:20 作者:醉归

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

对话框缺点:

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