Skip to content

Commit 0a3d8c0

Browse files
silkypriyamaskaravivek
authored andcommitted
Effective UI in nightmode (#2574)
* change bookmarks row button color * achievement_background * Change UI for nightmode * revert first commit, change color of buttons in bottom_sheet in night mode
1 parent d1a7b2c commit 0a3d8c0

16 files changed

+49
-19
lines changed

app/src/main/res/layout-land/welcome_do_upload.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
77
xmlns:app="http://schemas.android.com/apk/res-auto"
8-
android:background="#0c609c"
8+
android:background="?attr/tutorialBackground"
99
android:gravity="center"
1010
android:orientation="horizontal">
1111

app/src/main/res/layout-land/welcome_dont_upload.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
66
xmlns:app="http://schemas.android.com/apk/res-auto"
7-
android:background="#0c609c">
7+
android:background="?attr/tutorialBackground">
88

99
<android.support.constraint.Guideline
1010
android:id="@+id/center_guideline"

app/src/main/res/layout-land/welcome_final.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
android:orientation="vertical"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
android:background="#0c609c"
7+
android:background="?attr/tutorialBackground"
88

99
>
1010
<TextView

app/src/main/res/layout-land/welcome_image_details.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
android:background="#0c609c"
7+
android:background="?attr/tutorialBackground"
88
android:gravity="center"
99
android:orientation="horizontal">
1010

app/src/main/res/layout-land/welcome_wikipedia.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xmlns:tools="http://schemas.android.com/tools"
66
android:layout_width="match_parent"
77
android:layout_height="match_parent"
8-
android:background="#0c609c">
8+
android:background="?attr/tutorialBackground">
99

1010
<android.support.constraint.Guideline
1111
android:id="@+id/center_guideline"

app/src/main/res/layout/activity_achievements.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
android:layout_width="match_parent"
3838
android:layout_height="wrap_content"
3939
android:layout_below="@+id/toolbar"
40-
android:background="@color/layout_light_grey"
40+
android:background="?attr/achievementBackground"
4141
android:orientation="vertical">
4242

4343
<TextView
@@ -60,6 +60,7 @@
6060
android:layout_alignParentRight="true"
6161
android:layout_alignParentEnd="true"
6262
app:srcCompat="@drawable/ic_info_outline_black_24dp"
63+
android:tint="?attr/icon"
6364
android:layout_marginVertical="@dimen/activity_margin_vertical" />
6465

6566
<ImageView
@@ -100,6 +101,7 @@
100101
android:layout_toRightOf="@+id/images_upload_text_param"
101102
android:layout_toEndOf="@+id/images_upload_text_param"
102103
app:srcCompat="@drawable/ic_info_outline_blue_24dp"
104+
android:tint="?attr/icon"
103105
android:layout_marginLeft="8dp"
104106
android:layout_marginStart="8dp"/>
105107

@@ -152,6 +154,7 @@
152154
android:layout_toRightOf="@+id/images_reverted_text"
153155
android:layout_toEndOf="@+id/images_reverted_text"
154156
app:srcCompat="@drawable/ic_info_outline_blue_24dp"
157+
android:tint="?attr/icon"
155158
android:layout_marginLeft="8dp"
156159
android:layout_marginStart="8dp"/>
157160

@@ -216,6 +219,7 @@
216219
android:layout_toRightOf="@+id/images_used_by_wiki_text"
217220
android:layout_toEndOf="@+id/images_used_by_wiki_text"
218221
app:srcCompat="@drawable/ic_info_outline_blue_24dp"
222+
android:tint="?attr/icon"
219223
android:layout_marginLeft="8dp"
220224
android:layout_marginStart="8dp"/>
221225

app/src/main/res/layout/bottom_sheet_details.xml

+7-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
android:layout_height="wrap_content"
7878
android:layout_gravity="center_horizontal"
7979
app:srcCompat="@drawable/ic_round_star_border_24px"
80-
android:tint="@color/button_blue"/>
80+
android:tint="?attr/rowButtonColor"/>
8181
<TextView
8282
android:layout_width="wrap_content"
8383
android:layout_height="wrap_content"
@@ -104,7 +104,9 @@
104104
android:layout_height="wrap_content"
105105
android:layout_gravity="center_horizontal"
106106
android:duplicateParentState="true"
107-
app:srcCompat="@drawable/ic_directions_black_24dp" />
107+
app:srcCompat="@drawable/ic_directions_black_24dp"
108+
android:tint="?attr/rowButtonColor"
109+
/>
108110
<TextView
109111
android:layout_width="wrap_content"
110112
android:layout_height="wrap_content"
@@ -131,7 +133,8 @@
131133
android:layout_height="wrap_content"
132134
android:layout_gravity="center_horizontal"
133135
android:duplicateParentState="true"
134-
app:srcCompat="@drawable/ic_wikidata_logo_24dp" />
136+
app:srcCompat="@drawable/ic_wikidata_logo_24dp"
137+
android:tint="?attr/rowButtonColor"/>
135138
<TextView
136139
android:layout_width="wrap_content"
137140
android:layout_height="wrap_content"
@@ -160,6 +163,7 @@
160163
android:layout_gravity="center_horizontal"
161164
android:duplicateParentState="true"
162165
app:srcCompat="@drawable/ic_wikipedia_logo_24dp"
166+
android:tint="?attr/rowButtonColor"
163167
/>
164168
<TextView
165169
android:layout_width="wrap_content"

app/src/main/res/layout/drawer_header.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_height="match_parent"
66
android:layout_width="match_parent"
7-
android:background="@android:color/darker_gray">
7+
android:background="?attr/drawerHeaderBackground">
88

99
<ImageView
1010
android:id="@+id/pictureOfTheDay"
1111
android:layout_width="match_parent"
1212
android:layout_height="172dp"
13-
android:background="@android:color/darker_gray"
13+
android:background="?attr/drawerHeaderBackground"
1414
android:paddingLeft="@dimen/standard_gap"
1515
android:paddingTop="@dimen/standard_gap"
1616
android:paddingRight="@dimen/standard_gap"

app/src/main/res/layout/welcome_do_upload.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
android:orientation="vertical"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:background="#0c609c"
6+
android:background="?attr/tutorialBackground"
77
android:gravity="center"
88
android:weightSum="1"
99
android:layout_centerHorizontal="true">
1010
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
1111
android:orientation="vertical"
1212
android:layout_width="match_parent"
1313
android:layout_height="match_parent"
14-
android:background="#0c609c"
14+
android:background="?attr/tutorialBackground"
1515
android:gravity="center_vertical"
1616
>
1717

app/src/main/res/layout/welcome_dont_upload.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
android:orientation="vertical"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:background="#0c609c"
6+
android:background="?attr/tutorialBackground"
77
android:gravity="center_vertical"
88
>
99
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
1010
android:orientation="vertical"
1111
android:layout_width="match_parent"
1212
android:layout_height="match_parent"
13-
android:background="#0c609c"
13+
android:background="?attr/tutorialBackground"
1414
android:gravity="center_vertical"
1515
>
1616

app/src/main/res/layout/welcome_final.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
android:orientation="vertical"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:background="#0c609c"
6+
android:background="?attr/tutorialBackground"
77
>
88

99
<LinearLayout

app/src/main/res/layout/welcome_image_details.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
android:orientation="vertical"
1111
android:layout_width="match_parent"
1212
android:layout_height="match_parent"
13-
android:background="#0c609c"
13+
android:background="?attr/tutorialBackground"
1414
android:gravity="center_vertical"
1515
>
1616
<ImageView

app/src/main/res/layout/welcome_wikipedia.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
android:orientation="vertical"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:background="#0c609c"
6+
android:background="?attr/tutorialBackground"
77
android:gravity="center_vertical"
88
>
99
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
1010
android:orientation="vertical"
1111
android:layout_width="match_parent"
1212
android:layout_height="match_parent"
13-
android:background="#0c609c"
13+
android:background="?attr/tutorialBackground"
1414
android:gravity="center_vertical"
1515
>
1616

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

+5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@
1515
<attr name="buttonPressed" format="reference"/>
1616
<attr name="textDisabled" format="reference"/>
1717
<attr name="textEnabled" format="reference"/>
18+
<attr name="rowButtonColor" format="reference"/>
1819

1920
<attr name="contributionsListBackground" format="reference"/>
21+
<attr name="achievementBackground" format="reference"/>
22+
<attr name="drawerHeaderBackground" format="reference"/>
23+
<attr name="tutorialBackground" format="reference"/>
2024
<attr name="mainTabBackground" format="reference"/>
2125
<attr name="mainCardBackground" format="reference"/>
2226
<attr name="mainScreenNearbyPermissionbutton" format="reference"/>
27+
<attr name="icon" format="reference"/>
2328

2429

2530
<declare-styleable name="CompatTextView">

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

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
<!-- Main application background color -->
44
<color name="main_background_dark">#303030</color>
55
<color name="main_background_light">#fafafa</color>
6+
<color name="achievement_background_dark">#494949</color>
7+
<color name="achievement_background_light">#D6DCE0</color>
8+
<color name="drawerHeader_background_dark">#494949</color>
9+
<color name="drawerHeader_background_light">#aaaaaa</color>
10+
<color name="tutorial_background_dark">#303030</color>
11+
<color name="tutorial_background_light">#0c609c</color>
612
<color name="divider_grey">#eaeaea</color>
713
<color name="contributionListDarkBackground">#1a1a1a</color>
814

@@ -49,6 +55,7 @@
4955
<color name="enabled_button_text_color_dark">#FFFFFF</color>
5056

5157
<color name="button_blue">#0c609c</color>
58+
<color name="button_blue_dark">#116aaa</color>
5259

5360
<color name="bottom_bar_light">#E0E0E0</color>
5461
<color name="bottom_bar_dark">#424242</color>

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

+10
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44
<item name="contributionsListBackground">@color/contributionListDarkBackground</item>
55
<item name="mainTabBackground">@color/contributionListDarkBackground</item>
66
<item name="mainBackground">@color/main_background_dark</item>
7+
<item name="achievementBackground">@color/achievement_background_dark</item>
8+
<item name="drawerHeaderBackground">@color/drawerHeader_background_dark</item>
9+
<item name="tutorialBackground">@color/tutorial_background_dark</item>
10+
<item name="icon">@color/primaryTextColor</item>
711
<item name="colorPrimary">@color/primaryColor</item>
812
<item name="colorPrimaryDark">@color/primaryDarkColor</item>
913
<item name="colorAccent">@color/white</item>
1014
<item name="colorButtonNormal">@color/primaryColor</item>
15+
<item name="rowButtonColor">@color/button_blue_dark</item>
1116

1217
<item name="semitransparentText">@color/commons_app_blue_dark</item>
1318
<item name="subBackground">@color/sub_background_dark</item>
@@ -29,9 +34,14 @@
2934
<item name="contributionsListBackground">@color/white</item>
3035
<item name="mainTabBackground">@color/primaryColor</item>
3136
<item name="mainBackground">@color/main_background_light</item>
37+
<item name="achievementBackground">@color/achievement_background_light</item>
38+
<item name="drawerHeaderBackground">@color/drawerHeader_background_light</item>
39+
<item name="tutorialBackground">@color/tutorial_background_light</item>
40+
<item name="icon">@color/secondaryTextColor</item>
3241
<item name="colorPrimaryDark">@color/primaryDarkColor</item>
3342
<item name="colorAccent">@color/primaryColor</item>
3443
<item name="colorButtonNormal">@color/primaryColor</item>
44+
<item name="rowButtonColor">@color/button_blue</item>
3545

3646
<item name="semitransparentText">@color/commons_app_blue_light</item>
3747
<item name="subBackground">@color/sub_background_light</item>

0 commit comments

Comments
 (0)