Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5eb16c8 authored by cketti's avatar cketti
Browse files

Use AppCompat's 'srcCompat' attribute to reference drawables

This way AppCompat's VectorDrawable implementation will be used. It works
around a couple of platform bugs.
We can't use this mechanism in layouts that we don't inflate ourselves,
e.g. the message list widget layout.
parent 5d6d64f0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ android {
        minSdkVersion buildConfig.minSdk
        targetSdkVersion buildConfig.targetSdk

        generatedDensities = ['mdpi', 'hdpi', 'xhdpi']
        vectorDrawables.useSupportLibrary = true

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
+2 −1
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
@@ -15,7 +16,7 @@
        android:layout_height="40dp"
        android:contentDescription="@string/account_settings_action"
        android:padding="8dp"
        android:src="?attr/iconSettingsAccount" />
        app:srcCompat="?attr/iconSettingsAccount" />

    <LinearLayout
        android:layout_width="match_parent"
+2 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
<LinearLayout
        android:id="@+id/accounts_item_layout"
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="?android:attr/listPreferredItemHeight"
@@ -67,7 +68,7 @@
                android:gravity="center_vertical"
                android:focusable="false"
                android:layout_marginRight="3dip"
                android:src="?attr/iconFolder"
                app:srcCompat="?attr/iconFolder"
                android:background="?selectableItemBackground"
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
+2 −1
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
        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:id="@+id/folder_list_item_layout"
        android:layout_width="match_parent"
@@ -15,7 +16,7 @@
            android:layout_height="24dp"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="32dp"
            android:src="@drawable/ic_drafts_folder_light"/>
            app:srcCompat="@drawable/ic_drafts_folder_light"/>

    <TextView
            android:id="@+id/folder_name"
+5 −3
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
<merge
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <Button
        android:id="@+id/client_certificate_spinner_button"
@@ -17,6 +19,6 @@
        android:background="?selectableItemBackground"
        android:contentDescription="@string/client_certificate_spinner_delete"
        android:padding="8dp"
        android:src="?attr/iconActionCancel" />
        app:srcCompat="?attr/iconActionCancel" />

</merge>
Loading