From 224ba376cff8d5c22e59a6342d76094c284a6954 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 3 Jan 2020 23:45:25 +0100 Subject: [PATCH] use white text highlight color at B&W theme --- .../simplemobiletools/notes/pro/fragments/TextFragment.kt | 5 ++++- app/src/main/res/layout/open_note_item.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/TextFragment.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/TextFragment.kt index d49360d6..a193cde8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/TextFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/TextFragment.kt @@ -122,8 +122,11 @@ class TextFragment : NoteFragment() { return } - setColors(config.textColor, context.getAdjustedPrimaryColor(), config.backgroundColor) + val adjustedPrimaryColor = context.getAdjustedPrimaryColor() + setColors(config.textColor, adjustedPrimaryColor, config.backgroundColor) setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getTextSize()) + highlightColor = adjustedPrimaryColor.adjustAlpha(.4f) + gravity = config.getTextGravity() if (text.toString() != fileContents) { if (!skipTextUpdating) { diff --git a/app/src/main/res/layout/open_note_item.xml b/app/src/main/res/layout/open_note_item.xml index f7063db4..9ec51d28 100644 --- a/app/src/main/res/layout/open_note_item.xml +++ b/app/src/main/res/layout/open_note_item.xml @@ -10,7 +10,7 @@ android:id="@+id/open_note_item_radio_button" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_toLeftOf="@+id/open_note_item_icon"/> + android:layout_toStartOf="@+id/open_note_item_icon"/>