Android dialog : Is there a way to make background android UI clickable while dialog is displayed?

假装没事ソ 提交于 2019-12-10 21:27:08

问题


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,


回答1:


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.



来源:https://stackoverflow.com/questions/32932536/android-dialog-is-there-a-way-to-make-background-android-ui-clickable-while-di

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!