Skip to content
This repository was archived by the owner on Jun 27, 2020. It is now read-only.

Commit 90b4fcd

Browse files
Made the action bar colored. 1h.
1 parent dd69303 commit 90b4fcd

File tree

3 files changed

+31
-12
lines changed

3 files changed

+31
-12
lines changed

app/src/main/res/values-v11/styles.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/src/main/res/values-v14/styles.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/src/main/res/values/styles.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,42 @@
22
<resources xmlns:android="http://schemas.android.com/apk/res/android">
33
<style name="Theme.Default" parent="@android:style/Theme">
44
<item name="android:background">#ffffffff</item>
5+
6+
<!-- Support library compatibility -->
7+
<item name="actionBarStyle">@style/MyActionBar</item>
8+
<item name="actionBarTabTextStyle">@style/MyActionBarTabText</item>
9+
<item name="actionMenuTextColor">@color/white</item>
10+
11+
<item name="colorPrimary">@color/green_light</item>
12+
<item name="colorPrimaryDark">@color/green_dark</item>
13+
<item name="colorAccent">@color/white</item>
514
</style>
15+
616
<style name="Theme.NoTitle" parent="@android:style/Theme.NoTitleBar">
717
<item name="android:background">#ffffffff</item>
818
</style>
19+
920
<style name="Theme.FullScreen" parent="@android:style/Theme.NoTitleBar.Fullscreen">
1021
<item name="android:background">#ffffffff</item>
1122
</style>
23+
24+
<!-- ActionBar styles -->
25+
<style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar">
26+
<!-- Support library compatibility -->
27+
<item name="titleTextStyle">@style/MyActionBarTitleText</item>
28+
<item name="background">@color/green_light</item>
29+
<item name="backgroundStacked">@color/green_light</item>
30+
</style>
31+
32+
<!-- ActionBar title text -->
33+
<style name="MyActionBarTitleText" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
34+
<item name="android:textColor">@color/white</item>
35+
<!-- The textColor property is backward compatible with the Support Library -->
36+
</style>
37+
38+
<!-- ActionBar tabs text -->
39+
<style name="MyActionBarTabText" parent="@style/Widget.AppCompat.ActionBar.TabText">
40+
<item name="android:textColor">@color/white</item>
41+
<!-- The textColor property is backward compatible with the Support Library -->
42+
</style>
1243
</resources>

0 commit comments

Comments
 (0)