0

I am trying to override some values in the theme for my Android application. The AndroidManifest.xml file has the following declaration for the application:

<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="App" android:supportsRtl="true" android:theme="@android:style/AppTheme" > 

And in my style I have the following theme declared:

 <style name="AppTheme" parent="@android:style/Theme.Black.NoTitleBar.Fullscreen"> <item name="android:typeface">serif</item> </style> 

However when I build the project android studio says "Error:(28, 24) No resource found that matches the given name (at 'theme' with value '@android:style/AppTheme')."

How can I reference the theme from the manifest file? It works for the built in themes (such as Theme.Black.NoTitleBar.Fullscreen, for example)

2 Answers 2

3

You only have to use @style without the android prefix. Like this:

android:theme="@style/AppTheme" > 
Sign up to request clarification or add additional context in comments.

Comments

0

when you use @android:style you are referring resources included in the android sdk, to use you own you should only use @style, or other resources @drawable, @string, etc.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.