From b70c6c9f1b293290e6dce7847dd45360ba0eddcf Mon Sep 17 00:00:00 2001 From: Philoul Date: Sun, 9 Aug 2020 10:49:54 +0200 Subject: [PATCH] Update BGSourceFragment Arrow color a little bit lighter than text (don't find exact text color) Default color for arrows swtiched to white --- .../plugins/source/BGSourceFragment.kt | 5 ++-- app/src/main/res/layout/bgsource_item.xml | 9 +++++++- .../nightscout/androidaps/db/BgReadingTest.kt | 23 +++++++++++++++++++ core/src/main/res/drawable/ic_doubledown.xml | 4 ++-- core/src/main/res/drawable/ic_doubleup.xml | 4 ++-- core/src/main/res/drawable/ic_flat.xml | 2 +- .../main/res/drawable/ic_fortyfivedown.xml | 2 +- core/src/main/res/drawable/ic_fortyfiveup.xml | 2 +- core/src/main/res/drawable/ic_invalid.xml | 8 +++---- core/src/main/res/drawable/ic_singledown.xml | 2 +- core/src/main/res/drawable/ic_singleup.xml | 2 +- 11 files changed, 47 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/BGSourceFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/BGSourceFragment.kt index b01ba8d470..2b0d38fab8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/BGSourceFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/BGSourceFragment.kt @@ -5,6 +5,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.widget.ImageView import android.widget.TextView import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView @@ -86,7 +87,7 @@ class BGSourceFragment : DaggerFragment() { holder.invalid.visibility = if (!bgReading.isValid) View.VISIBLE else View.GONE holder.date.text = dateUtil.dateAndTimeString(bgReading.date) holder.value.text = bgReading.valueToUnitsToString(profileFunction.getUnits()) - holder.direction.text = bgReading.directionToSymbol(databaseHelper) + holder.direction.setImageResource(bgReading.directionToIcon(databaseHelper)) holder.remove.tag = bgReading } @@ -97,7 +98,7 @@ class BGSourceFragment : DaggerFragment() { inner class BgReadingsViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { var date: TextView = itemView.findViewById(R.id.bgsource_date) var value: TextView = itemView.findViewById(R.id.bgsource_value) - var direction: TextView = itemView.findViewById(R.id.bgsource_direction) + var direction: ImageView = itemView.findViewById(R.id.bgsource_direction) var invalid: TextView = itemView.findViewById(R.id.invalid_sign) var ns: TextView = itemView.findViewById(R.id.ns_sign) var remove: TextView = itemView.findViewById(R.id.bgsource_remove) diff --git a/app/src/main/res/layout/bgsource_item.xml b/app/src/main/res/layout/bgsource_item.xml index 5d1842b8c6..f7d5d54d57 100644 --- a/app/src/main/res/layout/bgsource_item.xml +++ b/app/src/main/res/layout/bgsource_item.xml @@ -34,7 +34,7 @@ android:paddingStart="10dp" android:text="Name" android:textStyle="bold" /> - + + + android:fillColor="@color/white"/> + android:fillColor="@color/white"/> diff --git a/core/src/main/res/drawable/ic_doubleup.xml b/core/src/main/res/drawable/ic_doubleup.xml index 32e541163a..9c56d4cf85 100644 --- a/core/src/main/res/drawable/ic_doubleup.xml +++ b/core/src/main/res/drawable/ic_doubleup.xml @@ -5,8 +5,8 @@ android:viewportHeight="24"> + android:fillColor="@color/white"/> + android:fillColor="@color/white"/> diff --git a/core/src/main/res/drawable/ic_flat.xml b/core/src/main/res/drawable/ic_flat.xml index ed4986a65d..487a647f10 100644 --- a/core/src/main/res/drawable/ic_flat.xml +++ b/core/src/main/res/drawable/ic_flat.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:fillColor="@color/white"/> diff --git a/core/src/main/res/drawable/ic_fortyfivedown.xml b/core/src/main/res/drawable/ic_fortyfivedown.xml index 199b8f4984..673a965fe4 100644 --- a/core/src/main/res/drawable/ic_fortyfivedown.xml +++ b/core/src/main/res/drawable/ic_fortyfivedown.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:fillColor="@color/white"/> diff --git a/core/src/main/res/drawable/ic_fortyfiveup.xml b/core/src/main/res/drawable/ic_fortyfiveup.xml index 24814d6714..930857ec66 100644 --- a/core/src/main/res/drawable/ic_fortyfiveup.xml +++ b/core/src/main/res/drawable/ic_fortyfiveup.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:fillColor="@color/white"/> diff --git a/core/src/main/res/drawable/ic_invalid.xml b/core/src/main/res/drawable/ic_invalid.xml index ab59d070b2..bdda131e7d 100644 --- a/core/src/main/res/drawable/ic_invalid.xml +++ b/core/src/main/res/drawable/ic_invalid.xml @@ -5,14 +5,14 @@ android:viewportHeight="24"> + android:fillColor="@color/white"/> + android:fillColor="@color/white"/> + android:fillColor="@color/white"/> + android:fillColor="@color/white"/> diff --git a/core/src/main/res/drawable/ic_singledown.xml b/core/src/main/res/drawable/ic_singledown.xml index ec4c30af82..bc3a0e7501 100644 --- a/core/src/main/res/drawable/ic_singledown.xml +++ b/core/src/main/res/drawable/ic_singledown.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:fillColor="@color/white"/> diff --git a/core/src/main/res/drawable/ic_singleup.xml b/core/src/main/res/drawable/ic_singleup.xml index 9ec675864b..6dda71fc74 100644 --- a/core/src/main/res/drawable/ic_singleup.xml +++ b/core/src/main/res/drawable/ic_singleup.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:fillColor="@color/white"/>