Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the holo dark theme in a Android app?

How can I set the dark holo theme in my app? At this time I got this:

<style name="AppTheme" parent="android:Theme.Holo.Light" /> 

But when I change it to:

<style name="AppTheme" parent="android:Theme.Holo.Dark" /> 

I get an error error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Dark'.

How to solve the problem?

like image 866
gurehbgui Avatar asked Oct 03 '12 11:10

gurehbgui


People also ask

How do I change the theme on my Android apps?

In the Project pane select Android, go to app > res > values > themes > themes.


2 Answers

change parent="android:Theme.Holo.Dark" to parent="android:Theme.Holo"

The holo dark theme is called Holo

like image 139
Lars Werkman Avatar answered Sep 24 '22 15:09

Lars Werkman


By default android will set Holo to the Dark theme. There is no theme called Holo.Dark, there's only Holo.Light, that's why you are getting the resource not found error.

So just set it to:

<style name="AppTheme" parent="android:Theme.Holo" /> 
like image 28
Anup Cowkur Avatar answered Sep 24 '22 15:09

Anup Cowkur