"You need to use a Theme.AppCompat theme"

I'm programming an application on android, and I've a little problem : I would like to make a customiz Dialog box so I do like in the android documentation :

In my manifest :

<application
        android:allowBackup="true"
        android:icon="@drawable/indice"
        android:label="33"
        android:theme="@style/AppTheme">

<activity android:name=".Autres.Indice"
        android:theme="@android:style/Theme.Holo.Dialog">

        </activity>

You are having this issue because the activity you are trying to apply the dialog theme to is not extending Activity , that requires AppCompat theme.

Change

    android:theme="@style/AppTheme">

For

    android:theme="@style/Theme.AppCompat" />
链接地址: http://www.djcxy.com/p/24252.html

上一篇: 设置EditText光标颜色

下一篇: “你需要使用Theme.AppCompat主题”