Skip to content

Commit

Permalink
Adjust dark mode colors, fix some dark mode issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertware committed Dec 20, 2021
1 parent 02ef08e commit aedf893
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Hyperrail/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

def VERSION_CODE = 55
def VERSION_NAME = '1.3.1'
def VERSION_CODE = 56
def VERSION_NAME = '1.3.2'

android {
compileSdkVersion 31
Expand Down
5 changes: 3 additions & 2 deletions Hyperrail/src/main/res/layout/activity_result_tabbed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="@color/colorPrimary"
android:background="@color/colorPrimaryDark"
android:elevation="4dp"
app:tabSelectedTextColor="@color/colorOnPrimary"
app:tabTextColor="@color/colorMuted" />
app:tabIndicatorColor="@color/colorTranslucentBackground"
app:tabTextColor="@color/colorTranslucentWhite" />

</androidx.viewpager.widget.ViewPager>

Expand Down
6 changes: 4 additions & 2 deletions Hyperrail/src/main/res/layout/contextmenu_spitsgids.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
android:layout_marginLeft="24dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:src="@drawable/ic_action_share"/>
android:src="@drawable/ic_action_share"
android:tint="@color/colorTextDark"/>

<TextView
android:layout_width="wrap_content"
Expand All @@ -84,7 +85,8 @@
android:layout_marginLeft="24dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:src="@drawable/ic_action_share"/>
android:src="@drawable/ic_action_share"
android:tint="@color/colorTextDark"/>

<TextView
android:layout_width="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
android:id="@+id/fragment_vehicle_composition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#a0fafafa"
android:background="@color/colorTranslucentBackground"
app:layout_constraintBottom_toBottomOf="@id/fragment_map" />

<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
android:background="#006ab3"
android:gravity="center"
android:text="@string/warning_composition_unconfirmed"
android:textColor="@color/colorTextLight" />
android:textColor="@color/colorTextAlwaysLight" />

<TextView
android:id="@+id/text_status_unavailable"
android:layout_width="match_parent"
android:layout_height="@dimen/listitem_content_height_double"
android:animateLayoutChanges="true"
android:background="@color/backgroundMaterialDark"
android:background="@color/colorBackgroundAlwaysDark"
android:gravity="center"
android:text="@string/warning_composition_unavailable"
android:textColor="@color/colorTextLight" />
android:textColor="@color/colorTextAlwaysLight" />
</LinearLayout>
3 changes: 2 additions & 1 deletion Hyperrail/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#8e0000</color><!-- Material red 800 -->
<color name="colorPrimary">#c62828</color><!-- Material red 800 -->
<color name="colorOnPrimary">#fffafafa</color>
<color name="ic_launcher_background">#c62828</color><!-- Material red 800 -->
<color name="colorPrimaryDark">#8e0000</color>
Expand All @@ -10,6 +10,7 @@
<color name="colorWhite">#000</color>
<color name="backgroundMaterialDark">#fffafafa</color>
<color name="backgroundMaterialLight">#ff212121</color>
<color name="colorTranslucentBackground">#a0212121</color>
<color name="colorTextDark">#fffafafa</color>
<color name="colorTextLight">#333</color>
<color name="colorTextAlwaysLight">#fffafafa</color>
Expand Down
11 changes: 8 additions & 3 deletions Hyperrail/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@
<item name="android:progressTint">@color/colorPrimary</item>
<item name="backgroundColor">@color/backgroundMaterialLight</item>
<item name="background">@color/backgroundMaterialLight</item>
<item name="android:navigationBarColor">
@android:color/transparent
</item>
</style>

<style name="ActionBarTheme" parent="@style/ThemeOverlay.AppCompat.DayNight.ActionBar">
<item name="android:textColor">@color/colorTextLight</item>
<item name="android:background">@color/colorPrimary</item>
<item name="android:background">@color/colorPrimaryDark</item>
</style>

<style name="ActionBarPopupTheme" parent="@style/ThemeOverlay.AppCompat.DayNight">
Expand All @@ -36,7 +39,7 @@
</style>

<style name="HyperrailAccentSearchContainer" parent="HyperrailAccentSearchField">
<item name="android:background">@color/colorPrimary</item>
<item name="android:background">@color/colorPrimaryDark</item>
<item name="android:elevation">4dp</item>
<item name="editTextStyle">@style/HyperrailAccentSearchText</item>
</style>
Expand Down Expand Up @@ -90,11 +93,13 @@
<item name="android:windowIsFloating">true</item>
<item name="android:actionMenuTextColor">@color/colorTextDark</item>
<item name="android:windowTitleStyle">@style/TrainLongClickDialogTitle</item>
<item name="android:background">@color/backgroundMaterialLight</item>
<item name="android:windowBackground">@color/backgroundMaterialLight</item>
</style>

<style name="TrainLongClickDialogTitle" parent="@style/Base.DialogWindowTitle.AppCompat">
<item name="android:background">@color/colorPrimary</item>
<item name="android:textColor">@color/colorTextLight</item>
<item name="android:textColor">@color/colorOnPrimary</item>
<item name="android:paddingBottom">@dimen/activity_vertical_margin</item>
</style>
</resources>
3 changes: 3 additions & 0 deletions Hyperrail/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
<color name="colorAccent">#FFF</color>

<color name="colorWhite">#FFF</color>
<color name="colorTranslucentBackground">#a0fafafa</color>
<color name="colorTranslucentWhite">#a0fafafa</color>
<color name="backgroundMaterialDark">#ff212121</color>
<color name="colorBackgroundAlwaysDark">#ff212121</color>
<color name="backgroundMaterialLight">#fffafafa</color>
<color name="colorTextDark">#333</color>
<color name="colorTextLight">#fffafafa</color>
Expand Down
10 changes: 7 additions & 3 deletions Hyperrail/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@
<item name="android:progressTint">@color/colorPrimary</item>
<item name="backgroundColor">@color/backgroundMaterialLight</item>
<item name="background">@color/backgroundMaterialLight</item>
<item name="android:navigationBarColor">
@android:color/transparent
</item>
</style>

<style name="ActionBarTheme" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="android:textColor">@color/colorTextLight</item>
<item name="android:background">@color/colorPrimary</item>
<item name="android:background">@color/colorPrimaryDark</item>
</style>

<style name="ActionBarPopupTheme" parent="@style/ThemeOverlay.AppCompat.Dark">
Expand All @@ -36,7 +39,7 @@
</style>

<style name="HyperrailAccentSearchContainer" parent="HyperrailAccentSearchField">
<item name="android:background">@color/colorPrimary</item>
<item name="android:background">@color/colorPrimaryDark</item>
<item name="android:elevation">4dp</item>
<item name="editTextStyle">@style/HyperrailAccentSearchText</item>
</style>
Expand Down Expand Up @@ -90,11 +93,12 @@
<item name="android:windowIsFloating">true</item>
<item name="android:actionMenuTextColor">@color/colorTextDark</item>
<item name="android:windowTitleStyle">@style/TrainLongClickDialogTitle</item>
<item name="android:background">@color/backgroundMaterialLight</item>
</style>

<style name="TrainLongClickDialogTitle" parent="@style/Base.DialogWindowTitle.AppCompat">
<item name="android:background">@color/colorPrimary</item>
<item name="android:textColor">@color/colorTextLight</item>
<item name="android:textColor">@color/colorOnPrimary</item>
<item name="android:paddingBottom">@dimen/activity_vertical_margin</item>
</style>
</resources>

0 comments on commit aedf893

Please sign in to comment.