Skip to content

Commit b490abd

Browse files
committed
Add support for day theme.
Use LightSplashTheme when using day mode.
1 parent 8aeee41 commit b490abd

File tree

10 files changed

+17
-9
lines changed

10 files changed

+17
-9
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
<!-- Activities -->
2222
<activity
2323
android:name=".feature.main.SplashActivity"
24-
android:theme="@style/SplashTheme">
24+
android:theme="@style/DarkSplashTheme">
25+
<!-- Change it to LightSplashTheme when using day mode -->
2526
<intent-filter>
2627
<action android:name="android.intent.action.MAIN" />
2728

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
</data>
3030

3131
<LinearLayout
32+
android:layout_marginStart="16dp"
33+
android:layout_marginEnd="16dp"
3234
android:layout_width="match_parent"
3335
android:layout_height="wrap_content"
3436
android:orientation="vertical"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
</data>
3030

3131
<LinearLayout
32+
android:layout_marginStart="16dp"
33+
android:layout_marginEnd="16dp"
3234
android:layout_width="match_parent"
3335
android:layout_height="wrap_content"
3436
android:orientation="vertical"

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
android:layout_height="match_parent">
3333

3434
<LinearLayout
35-
android:layout_marginStart="16dp"
36-
android:layout_marginEnd="16dp"
3735
android:layout_width="match_parent"
38-
android:layout_height="wrap_content">
36+
android:layout_height="wrap_content"
37+
android:paddingBottom="32dp"
38+
android:clipToPadding="false"
39+
android:clipChildren="false">
3940

4041
<include
4142
layout="@layout/unified_diagnosis_section"

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
android:layout_height="match_parent">
3535

3636
<LinearLayout
37-
android:layout_marginStart="16dp"
38-
android:layout_marginEnd="16dp"
3937
android:animateLayoutChanges="true"
4038
android:paddingBottom="32dp"
4139
android:orientation="vertical"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
</data>
3131

3232
<LinearLayout
33+
android:layout_marginStart="16dp"
34+
android:layout_marginEnd="16dp"
3335
android:layout_width="match_parent"
3436
android:layout_height="wrap_content"
3537
android:orientation="vertical"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
</data>
2929

3030
<androidx.cardview.widget.CardView
31+
android:layout_marginStart="16dp"
32+
android:layout_marginEnd="16dp"
3133
android:layout_marginTop="24dp"
3234
style="@style/SectionCard">
3335

app/src/main/res/values-night/themes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</style>
4343

4444
<!-- Splash theme. -->
45-
<style name="SplashTheme" parent="AppBaseThemeDark">
45+
<style name="DarkSplashTheme" parent="AppBaseThemeDark">
4646
<item name="android:windowBackground">@drawable/splash_background_dark</item>
4747
</style>
4848

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<item name="android:layout_width">match_parent</item>
2424
<item name="android:layout_height">60dp</item>
2525
<item name="android:textSize">18sp</item>
26-
<item name="android:textColor">?android:attr/textColorPrimary</item>
26+
<item name="android:textColor">@android:color/white</item>
2727
<item name="colorAccent">?android:attr/colorPrimary</item>
2828
</style>
2929

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</style>
4343

4444
<!-- Splash theme. -->
45-
<style name="SplashTheme" parent="AppBaseThemeDark">
45+
<style name="LightSplashTheme" parent="AppBaseThemeLight">
4646
<item name="android:windowBackground">@drawable/splash_background_light</item>
4747
</style>
4848

0 commit comments

Comments
 (0)