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

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

    min sdk is 10. ActionBar is available from api level 11. So for 10 you would be using AppCompat from the support library for which you need to use Theme.AppCompat or descendant of the same.

    Use

    android:theme="@style/Theme.AppCompat" >
    

    Or if you dont want action bar at the top

    android:theme="@style/Theme.AppCompat.NoActionBar">
    

    More info @

    http://developer.android.com/guide/topics/ui/actionbar.html

    Edit:

    I might have misread op post.

    Seems op wants a Dialog with a Activity Theme. So as already suggested by Bobbake4 extend Activity instead of ActionBarActivity.

    Also have a look @ Dialog Attributes in the link below

    http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4_r1/frameworks/base/core/res/res/values/themes.xml/

提交回复
热议问题