Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes page dark mode #389

Merged
merged 5 commits into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/cursor_color.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<size android:width="3dp" />
<solid android:color="#FFFFFF" />
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_add_photo_attachment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:translateX="332"
android:translateY="16">
<path
android:fillColor="#dddddd"
android:fillColor="@color/attachment_color"
android:strokeWidth="1"
android:pathData="M 24.609863,23.246094 c 2.347168,0 3.526367,-1.167969 3.526367,-3.481446 V 8.0063477 c 0,-2.3134766 -1.179199,-3.4702149 -3.526367,-3.4702149 h -2.616699 c -0.875977,0 -1.156738,-0.1796875 -1.650879,-0.7412109 L 19.432617,2.7841797 C 18.871094,2.1665039 18.29834,1.8295898 17.141602,1.8295898 h -4.480957 c -1.156739,0 -1.729493,0.3369141 -2.291016,0.9545899 L 9.4711914,3.7949219 C 8.9770508,4.3452148 8.6962891,4.5361328 7.8203125,4.5361328 H 5.2709961 c -2.347168,0 -3.5263672,1.1567383 -3.5263672,3.4702149 V 19.764648 c 0,2.313477 1.1791992,3.481446 3.5263672,3.481446 z m -9.669433,-3.59375 c -3.391602,0 -6.1206058,-2.729004 -6.1206058,-6.143067 0,-3.414062 2.7290038,-6.1430661 6.1206058,-6.1430661 3.402832,0 6.131836,2.7290041 6.131836,6.1430661 0,3.414063 -2.729004,6.143067 -6.131836,6.143067 z m 8.074707,-8.883301 c -0.763672,0 -1.392578,-0.617676 -1.392578,-1.3813477 0,-0.7749023 0.628906,-1.3925781 1.392578,-1.3925781 0.763672,0 1.392578,0.6176758 1.392578,1.3925781 0,0.7636717 -0.628906,1.3813477 -1.392578,1.3813477 z m -8.074707,7.176269 c 2.448242,0 4.436035,-1.976562 4.436035,-4.436035 0,-2.459472 -1.987793,-4.4360348 -4.436035,-4.4360348 -2.448242,0 -4.424805,1.9765628 -4.424805,4.4360348 0,2.459473 1.987793,4.436035 4.424805,4.436035 z" />
</group>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_close_white.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFF"
android:fillColor="@color/close"
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" />
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:translateX="335"
android:translateY="13.5">
<path
android:fillColor="#dddddd"
android:fillColor="@color/attachment_color"
android:pathData="M 7.1199623,12.76114 17.437046,5.8021941 19.963111,7.4973021 9.6456627,14.456494
9.557223,14.495004 7.2420482,15.084959 C 6.6545817,15.22952 6.045096,14.857872
6.1874497,14.448318 l 0.03082,-0.06853 0.84375,-1.557398 z M 19.449538,4.457555
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_tabs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/tabs_toolbar"
android:layout_width="match_parent"
android:background="@color/main_blue"
android:background="@color/colorPrimaryDark"
app:titleTextColor="@color/white"
app:title="@string/new_boarding"
app:subtitleTextColor="@color/white"
Expand Down
11 changes: 9 additions & 2 deletions app/src/main/res/layout/item_edit_report_note.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
android:layout_height="36sp"
android:ellipsize="end"
android:gravity="center_vertical"
android:textColor="@color/header_color"
android:singleLine="true"
android:text="@{holder.currentItem.title}"
app:layout_constraintEnd_toStartOf="@id/note_action_add_attachment"
Expand All @@ -53,7 +54,7 @@
android:layout_height="@dimen/add_attachment_icon_size"
android:onClick="@{() -> holder.onAddPhotoAttachment()}"
android:src="@drawable/ic_add_photo_attachment"
android:tint="@color/dark_grey"
android:tint="@color/attachment_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -63,20 +64,26 @@
android:layout_height="@dimen/edit_icon_size"
android:onClick="@{() -> holder.onEditNote()}"
android:src="@drawable/ic_edit"
android:tint="@color/dark_grey"
android:tint="@color/attachment_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/note_edit_layout"
android:layout_width="match_parent"
android:backgroundTint="@color/white"
android:layout_height="wrap_content"
app:boxStrokeColor="@color/header_color"
android:layout_marginTop="12dp"
app:layout_constraintTop_toBottomOf="@id/note_title">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/note_edit"
android:layout_width="match_parent"

android:textCursorDrawable="@null"
android:textColorHint="@color/header_color"

android:layout_height="wrap_content"
android:hint="@string/new_note"
android:text="@={holder.currentItem.note.note}" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/item_view_attachment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
android:layout_height="wrap_content"
android:text="@{note}"
app:layout_constraintStart_toStartOf="parent"
android:textColor="@color/header_color"
app:layout_constraintTop_toBottomOf="@id/attachment_note_title"
app:layout_constraintWidth_percent="0.5"
tools:text="Some long notes here will be displayed in multi line" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/menu/menu_create_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<item
android:id="@+id/menu_report_submit"
android:title="@string/menu_save_report"
app:itemTextColor="@color/white"
app:itemTextColor="@color/main_blue"
app:showAsAction="ifRoom|collapseActionView" />
</menu>
51 changes: 51 additions & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<color name="colorPrimary">#000000</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorAccent">#000000</color>

<color name="background_card">#1C1C1E</color>
<color name="background_screen_with_cards">#000000</color>
<color name="map_coordinates_background">#B4FFFFFF</color>
<color name="divider">#CCC7C7</color>
<color name="grey">#696969</color>
<color name="dark_grey">#666666</color>
<color name="light_grey">#D8D8D8</color>
<color name="medium_grey">#B9B9B9</color>
<color name="tab_inactive">#979797</color>
<color name="white">#FFFFFF</color>
<color name="green">#008537</color>
<color name="light_green">#ECF4EF</color>
<color name="green_background">#DEEFE5</color>
<color name="green_text">#006128</color>
<color name="amber">#FFBF22</color>
<color name="light_amber">#4CFFECBC</color>
<color name="amber_text">#614500</color>
<color name="amber_background">#FFECBC</color>
<color name="red">#CF2222</color>
<color name="light_red">#4CF6D4D4</color>
<color name="red_text">#960B0B</color>
<color name="red_text_2">#891515</color>
<color name="red_background">#F6D4D4</color>
<color name="small_title_text">#DADADA</color>
<color name="main_blue">#3B78B6</color>
<color name="main_blue_disabled">#800A4074</color>
<color name="tabs_blue_background">#190A4074</color>
<color name="tabs_amber">#E17000</color>
<color name="captain_background">#E7ECF1</color>
<color name="record_second">#979797</color>
<color name="light_grey_background">#F7F7F7</color>
<color name="grey_text">#818181</color>
<color name="search_record_background">#FFFFFF</color>
<color name="status_bar_blue">#000000</color>
<color name="search_icon_color">#8A000000</color>
<color name="text_input_hint">#979797</color>
<color name="header_color">#FFFFFF</color>
<color name="close">#3B78B6</color>
<color name="input_tint">#FFF</color>
<color name="attachment_color">#979797</color>

<color name="mtrl_textinput_default_box_stroke_color" tools:override="true">#FFF</color>
<color name="mtrl_textinput_focused_box_stroke_color" tools:override="true">#FFF</color>
<color name="mtrl_textinput_hovered_box_stroke_color" tools:override="true">#FFF</color>
</resources>
11 changes: 10 additions & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<color name="colorPrimary">@color/white</color>
<color name="colorPrimaryDark">@color/main_blue</color>
<color name="colorAccent">@color/main_blue</color>
Expand Down Expand Up @@ -42,4 +42,13 @@
<color name="search_icon_color">#8A000000</color>

<color name="text_input_hint">#979797</color>
<color name="header_color">#000000</color>
<color name="close">#FFF</color>
<color name="input_tint">#000000</color>
<color name="attachment_color">#666666</color>
<color name="mtrl_textinput_default_box_stroke_color" tools:override="true">#000000</color>
<color name="mtrl_textinput_focused_box_stroke_color" tools:override="true">#000000</color>
<color name="mtrl_textinput_hovered_box_stroke_color" tools:override="true">#000000</color>


</resources>
13 changes: 9 additions & 4 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/status_bar_blue</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:actionMenuTextColor">@color/white</item>
<item name="android:actionMenuTextColor">@color/close</item>
<item name="actionOverflowButtonStyle">@style/OverflowButton</item>
<item name="searchViewStyle">@style/ToolbarSearchViewStyle</item>
<item name="textInputStyle">@style/TextInputLayoutStyle</item>
Expand All @@ -16,7 +16,7 @@
</style>

<style name="CardHeader" parent="Widget.AppCompat.TextView">
<item name="android:textColor">@android:color/black</item>
<item name="android:textColor">@color/colorPrimaryDark</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textSize">20sp</item>
</style>
Expand Down Expand Up @@ -71,11 +71,16 @@

<style name="TextInputLayoutStyle" parent="Widget.Design.TextInputLayout">
<item name="android:layout_height">52dp</item>
<item name="android:textColorHint">@color/text_input_hint</item>
<item name="boxStrokeColor">@color/header_color</item>
<item name="boxStrokeWidth">2dp</item>
<item name="android:textColorHint">@color/tab_inactive</item>
<item name="hintTextAppearance">@style/TextInputLayoutHintStyle</item>
</style>

<style name="TextInputLayoutHintStyle">
<item name="android:textSize">16sp</item>
<item name="boxStrokeColor">@color/header_color</item>
</style>


</resources>