Android对话框:在显示对话框时有没有办法使背景android UI可点击? [英] Android dialog : Is there a way to make background android UI clickable while dialog is displayed?

查看:101
本文介绍了Android对话框:在显示对话框时有没有办法使背景android UI可点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在使用Libgdx制作大量动画的应用程序。我正在尝试使用android对话框通过界面显示html标签段落。虽然,我可以改变背景UI的暗淡的颜色恢复正常与下面的代码。

  paragraphDialog.getWindow()。clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); 

有什么我可以做的,以使后台UI工作吗? (按钮点击,textview焦点等)



而且,我已经尝试了GlyphLayout的Libgdx段落。它经常崩溃也不支持html标签。我正在使用对话框,因为使用对话框很容易使用xml布局。如果有任何其他选择,请建议。



谢谢,

解决方案

您的对话框阻止整个屏幕,无论边缘/背景是否有些透明或不是100%的阿尔法,它仍然是当前视图。因此,您不能直接点击它。



我认为实现目标的最佳方式是使用片段。不是对话框。


Currently, I am using Libgdx for making app with lots of animation. I am trying to use android Dialog for showing paragraph with html tags through Interface. While, I can change dim color of background UI back to normal with following code.

paragraphDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);

Is there anything I can do to make background UI work? (Button click, textview focus etc)

And, I have tried GlyphLayout of Libgdx for paragraph. It frequently crashes & also doesn't support html tags. I am using dialogs, as it is pretty easy to use xml layout easily with dialogs. If there are any other options, Please suggest.

Thanks,

解决方案

your dialog is blocking the entire screen, doesn't matter if the edges/background are somewhat transparent or not 100% alpha, it is still the view that is currently on top. therefor, you can't click on it directly.

i think the best way to achieve your goal is with a fragment. not a dialog.

这篇关于Android对话框:在显示对话框时有没有办法使背景android UI可点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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