I'm trying to change the background colour of my Android app, but I'm not being able to. I've searched through a lot of posts but none solution solved mine.
Here's mine styles.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/ActionBar</item>
</style>
<style name="ActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">#ff0000</item>
</style>
</resources>
As you can see, I'm just trying to set the bar to red. Here's my manifest:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MenuActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
The theme is properly set, as you can see. And just so you can see, here's my gradle:
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
...
minSdkVersion 15
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
}
So, even though this looks alright, it is not setting my ActionBar to red. I tried following a lot of guides (including the official one) and I've done everything as they say. What am I missing? Thank you for your patience in advance :)