1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

revert workaround for compound drawables tinting bug in some Android versions, bug has been fixed

This commit is contained in:
Christophe Beyls 2020-09-14 14:41:50 +02:00
parent ae3212822d
commit e306f6436b
11 changed files with 11 additions and 9 deletions

View file

@ -100,7 +100,7 @@ class EventsAdapter constructor(context: Context, owner: LifecycleOwner, private
this.event = event
title.text = event.title
val bookmarkDrawable = if (isBookmarked) AppCompatResources.getDrawable(context, R.drawable.ic_bookmark_24dp) else null
val bookmarkDrawable = if (isBookmarked) AppCompatResources.getDrawable(context, R.drawable.ic_bookmark_white_24dp) else null
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(title, null, null, bookmarkDrawable, null)
title.contentDescription = if (isBookmarked) {
context.getString(R.string.in_bookmarks_content_description, event.title ?: "")

View file

@ -129,7 +129,7 @@ class TrackScheduleAdapter(context: Context, private val listener: EventClickLis
time.text = event.startTime?.let { timeDateFormat.format(it) }
title.text = event.title
val bookmarkDrawable = if (isBookmarked) AppCompatResources.getDrawable(context, R.drawable.ic_bookmark_24dp) else null
val bookmarkDrawable = if (isBookmarked) AppCompatResources.getDrawable(context, R.drawable.ic_bookmark_white_24dp) else null
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(title, null, null, bookmarkDrawable, null)
title.contentDescription = if (isBookmarked) {
context.getString(R.string.in_bookmarks_content_description, event.title ?: "")

View file

@ -2,7 +2,7 @@
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/selected"
android:drawable="@drawable/ic_bookmark_24dp"
android:drawable="@drawable/ic_bookmark_white_24dp"
android:state_selected="true" />
<item
android:id="@+id/unselected"

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:tint="?colorControlNormal"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?colorControlNormal"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path

View file

@ -1,7 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:tint="?colorControlNormal"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path

View file

@ -61,7 +61,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:drawableStartCompat="@drawable/ic_access_time_18dp"
app:drawableStartCompat="@drawable/ic_access_time_white_18dp"
tools:text="Day 1 (Saturday), 09:30 - 09:55" />
<TextView
@ -70,7 +70,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:saveEnabled="false"
app:drawableStartCompat="@drawable/ic_place_18dp"
app:drawableStartCompat="@drawable/ic_place_white_18dp"
tools:text="Janson (Building J)" />
<TextView

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.internal.ForegroundLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -31,6 +32,7 @@
android:textAlignment="viewStart"
android:textAppearance="?textAppearanceHeadline6"
android:textSize="18sp"
app:drawableTint="?colorControlNormal"
tools:text="Welcome to FOSDEM 2015" />
<TextView

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -39,6 +40,7 @@
android:textAlignment="viewStart"
android:textAppearance="?textAppearanceHeadline6"
android:textSize="18sp"
app:drawableTint="?colorControlNormal"
tools:text="Welcome to FOSDEM 2015" />
<TextView

View file

@ -9,7 +9,7 @@
android:title="@string/menu_tracks" />
<item
android:id="@+id/menu_bookmarks"
android:icon="@drawable/ic_bookmark_24dp"
android:icon="@drawable/ic_bookmark_white_24dp"
android:title="@string/menu_bookmarks" />
<item
android:id="@+id/menu_live"

View file

@ -87,6 +87,7 @@
<item name="android:gravity">start|center_vertical</item>
<item name="android:textAlignment">viewStart</item>
<item name="android:drawablePadding">8dp</item>
<item name="drawableTint">?colorControlNormal</item>
</style>
<style name="Header">