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

前端 未结 30 4034
感动是毒
感动是毒 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:11

    I had such crash on Samsung devices even though the activity did use Theme.AppCompat. The root cause was related to weird optimizations on Samsung side:

    - if one activity of your app has theme not inherited from Theme.AppCompat
    - and it has also `android:launchMode="singleTask"`
    - then all the activities that are launched from it will share the same Theme
    

    My solution was just removing android:launchMode="singleTask"

提交回复
热议问题