You need to use a Theme.AppCompat theme (or descendant) with this activity

前端 未结 30 4003
感动是毒
感动是毒 2020-11-21 04:42

Android Studio 0.4.5

Android documentation for creating custom dialog boxes: http://developer.android.com/guide/topics/ui/dialogs.html

If you want a custom d

30条回答
  •  [愿得一人]
    2020-11-21 05:07

    In my case such issue was appear when i tried to show Dialog. The problem was in context, I've use getBaseContext() which theoretically should return Activity context, but appears its not, or it return context before any Theme applied.

    So I just replaced getBaseContexts() with "this", and now it work as expected.

            Dialog.showAlert(this, title, message,....);
    

提交回复
热议问题