Android dialog : Is there a way to make background

2019-07-04 06:25发布

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条回答
Luminary・发光体
2楼-- · 2019-07-04 07:29

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.

查看更多
登录 后发表回答