Skip to content

Commit

Permalink
feat(theming): Reduce dependence on colorPrimary
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Niedermann <[email protected]>
  • Loading branch information
stefan-niedermann authored and AndyScherzinger committed Apr 11, 2023
1 parent 2b57ad6 commit fc4ed90
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions app/src/main/res/layout/activity_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_container_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimary" />
android:layout_height="match_parent" />

</LinearLayout>
5 changes: 2 additions & 3 deletions app/src/main/res/layout/fragment_note_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:background="?attr/colorPrimary">
android:layout_height="match_parent">

<!-- Dummy item to prevent editContent from receiving focus -->
<LinearLayout
Expand All @@ -28,7 +27,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/spacer_activity_sides"
android:background="?attr/colorPrimary"
android:background="@android:color/transparent"
android:ems="10"
android:gravity="top"
android:inputType="textMultiLine|textCapSentences"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/fragment_note_preview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:background="?attr/colorPrimary">
android:layout_height="match_parent">

<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swiperefreshlayout"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-v27/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>

<style name="AppTheme" parent="BaseTheme">
<item name="android:navigationBarColor">?attr/colorPrimary</item>
<item name="android:navigationBarColor">@color/bg_default</item>
<item name="android:windowLightNavigationBar">@bool/isDayMode</item>
</style>
</resources>
4 changes: 2 additions & 2 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<item name="colorPrimaryDark">?android:colorPrimary</item>
<item name="colorAccent">@color/accent</item>

<item name="android:statusBarColor">?attr/colorPrimary</item>
<item name="android:statusBarColor">@color/bg_default</item>
<item name="android:windowLightStatusBar">@bool/isDayMode</item>
<item name="android:colorControlNormal">?attr/colorAccent</item>
<item name="android:colorControlActivated">?attr/colorAccent</item>
<item name="android:textColorLink">?android:colorAccent</item>
<item name="android:textColorHighlight">@color/defaultTextHighlightBackground</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:windowBackground">@color/bg_default</item>
<item name="android:actionModeBackground">?attr/colorPrimary</item>
<item name="android:actionModeBackground">@color/bg_default</item>

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

0 comments on commit fc4ed90

Please sign in to comment.