Skip to content

Commit fc4ed90

Browse files
stefan-niedermannAndyScherzinger
authored andcommitted
feat(theming): Reduce dependence on colorPrimary
Signed-off-by: Stefan Niedermann <info@niedermann.it>
1 parent 2b57ad6 commit fc4ed90

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<androidx.fragment.app.FragmentContainerView
1717
android:id="@+id/fragment_container_view"
1818
android:layout_width="match_parent"
19-
android:layout_height="match_parent"
20-
android:background="?attr/colorPrimary" />
19+
android:layout_height="match_parent" />
2120

2221
</LinearLayout>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
6-
android:layout_height="match_parent"
7-
tools:background="?attr/colorPrimary">
6+
android:layout_height="match_parent">
87

98
<!-- Dummy item to prevent editContent from receiving focus -->
109
<LinearLayout
@@ -28,7 +27,7 @@
2827
android:layout_width="match_parent"
2928
android:layout_height="wrap_content"
3029
android:layout_marginHorizontal="@dimen/spacer_activity_sides"
31-
android:background="?attr/colorPrimary"
30+
android:background="@android:color/transparent"
3231
android:ems="10"
3332
android:gravity="top"
3433
android:inputType="textMultiLine|textCapSentences"

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
6-
android:layout_height="match_parent"
7-
tools:background="?attr/colorPrimary">
6+
android:layout_height="match_parent">
87

98
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
109
android:id="@+id/swiperefreshlayout"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<resources>
33

44
<style name="AppTheme" parent="BaseTheme">
5-
<item name="android:navigationBarColor">?attr/colorPrimary</item>
5+
<item name="android:navigationBarColor">@color/bg_default</item>
66
<item name="android:windowLightNavigationBar">@bool/isDayMode</item>
77
</style>
88
</resources>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
<item name="colorPrimaryDark">?android:colorPrimary</item>
77
<item name="colorAccent">@color/accent</item>
88

9-
<item name="android:statusBarColor">?attr/colorPrimary</item>
9+
<item name="android:statusBarColor">@color/bg_default</item>
1010
<item name="android:windowLightStatusBar">@bool/isDayMode</item>
1111
<item name="android:colorControlNormal">?attr/colorAccent</item>
1212
<item name="android:colorControlActivated">?attr/colorAccent</item>
1313
<item name="android:textColorLink">?android:colorAccent</item>
1414
<item name="android:textColorHighlight">@color/defaultTextHighlightBackground</item>
1515
<item name="windowActionModeOverlay">true</item>
1616
<item name="android:windowBackground">@color/bg_default</item>
17-
<item name="android:actionModeBackground">?attr/colorPrimary</item>
17+
<item name="android:actionModeBackground">@color/bg_default</item>
1818

1919
<!-- Workaround: Preferences Dialogs are using AlertDialogs instead of MaterialAlertDialogs. -->
2020
<!-- https://stackoverflow.com/questions/70650073/adjust-androidx-preference-dialogs-to-follow-material-you -->

0 commit comments

Comments
 (0)