Android 6.0 Dialog text doesn't appear

后端 未结 11 2097
感情败类
感情败类 2020-12-15 17:02

I updated my phone to Android 6.0 and I have these 2 problems with dialogs:

1)The title is shown but the messages isn\'t for alert dialog(SOLVED):

          


        
11条回答
  •  温柔的废话
    2020-12-15 17:07

    I suspect that you are ending up showing white text on a white background! (Looking at the screenshot, the (i) icon is not showing up well either, suggesting that it was designed to be shown on a background other than white.

    You can use the constructor public AlertDialog.Builder (Context context, int themeResId) to ensure you are using a specific theme to style your dialog, where the Theme_Material_Dialog is probably what you want.

提交回复
热议问题