android游戏暂停屏幕,对话框还是活动对话框? [英] android game pause screen , dialog or activity dialog?

查看:149
本文介绍了android游戏暂停屏幕,对话框还是活动对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对在我的Android游戏上显示暂停屏幕的最佳方法有些困惑.最好是使用pauseMenuActivity还是仅使用pauseDialog就足够了?这个暂停对话框只会显示得分,金钱,后退按钮,选项按钮和退出按钮.如果显示对话框更好,我不知道如何显示这些按钮和背景图像.有人可以帮助我吗?谢谢

I am a little confused about the best way to show pause screen on my android game. will it be better to be a pauseMenuActivity or is it enough with just pauseDialog? this pause dialog will just show score, money, back button, option button , and quit button. if it is better to show dialog, I don't know how to show those buttons and background image.. anyone can help me? thank you

推荐答案

我建议您使用对话框(或其他自定义叠加层).根据我的经验,活动之间的过渡并不总是很快,并且在游戏的背景下它们会显得有些呆滞.我认为,当我在暂停屏幕上并想再次开始播放时,它应该是瞬时的.

I would recommend going for a Dialog (or some other custom overlay). From my experience, inter-Activities transitions aren't always very quick and they can feel kind of sluggish in the context of a game. In my opinion, when I am on a pause screen and want to start playing again, it should be instantaneous.

此外,如果您只想显示4个按钮,那么活动"就是一种矫kill过正.

Plus, an Activity is kind of overkill if you just want to show 4 buttons.

要创建包含自定义布局的自定义对话框,请查看以下教程,如果有特定问题/问题,请再次发布: http://developer.android.com/guide/topics/ui/dialogs .html#CustomDialog

To create a custom dialog containing a custom layout, have a look at the following tutorial and post again if you have specific questions/problems : http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog

这篇关于android游戏暂停屏幕,对话框还是活动对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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