writelosa.blogg.se

Android studio theme holo light darkactionbar
Android studio theme holo light darkactionbar










android studio theme holo light darkactionbar

The general rule is that if you want your code to support older versions of Android, it should have the AppCompat theme and the java code should extend AppCompatActivity. In this case, change the Java inheritance from ActionBarActivity to Activity and leave the dialog theme in the manifest as it is, a non Theme.AppCompat value Update : Extending AppCompatActivity would also have this problem The reason you are having this problem is because the activity you are trying to apply the dialog theme to is extending ActionBarActivity which requires the AppCompat theme to be applied.

android studio theme holo light darkactionbar

I am supporting the following, and I can't using something greater than 10 for the min: minSdkVersion 10Īnd in my manifest I have this for the activity: Ĭreating the dialog box like this was something I was hopping to do, as I have already completed the layout.Ĭan anyone tell me how I can get around this problem? However, when I tried this I get the following exception: : You need to use a Theme.AppCompat theme (or descendant) with this activity Simply create an activity and set its theme to in the manifest element: If you want a custom dialog, you can instead display an Activity as a dialog instead of using the Dialog APIs. Android documentation for creating custom dialog boxes:












Android studio theme holo light darkactionbar