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.
This commit is contained in:
cketti 2020-05-09 15:43:52 +02:00
parent 5d6d64f00b
commit f5eb16c844
26 changed files with 96 additions and 76 deletions

View file

@ -47,7 +47,7 @@ android {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk
generatedDensities = ['mdpi', 'hdpi', 'xhdpi']
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View file

@ -1,5 +1,6 @@
<?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"

View file

@ -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"

View file

@ -1,6 +1,7 @@
<?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"

View file

@ -1,5 +1,7 @@
<?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>
</merge>

View file

@ -1,5 +1,6 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
@ -18,7 +19,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="10dp"
android:src="?attr/iconActionExpand" />
app:srcCompat="?attr/iconActionExpand" />
<TextView
android:id="@+id/foldableText"
@ -36,4 +37,4 @@
android:orientation="vertical"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>

View file

@ -1,5 +1,6 @@
<?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"
@ -17,7 +18,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"

View file

@ -1,5 +1,6 @@
<?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"
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
@ -14,7 +15,7 @@
android:layout_width="fill_parent">
<ImageView
android:src="@mipmap/icon"
app:srcCompat="@mipmap/icon"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
@ -44,7 +45,7 @@
android:focusable="true"
android:background="?attr/selectableItemBackground">
<ImageView
android:src="?attr/iconSettingsAbout"
app:srcCompat="?attr/iconSettingsAbout"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center" />
@ -81,7 +82,7 @@
android:focusable="true"
android:background="?attr/selectableItemBackground">
<ImageView
android:src="?attr/iconAboutAuthors"
app:srcCompat="?attr/iconAboutAuthors"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center" />
@ -118,7 +119,7 @@
android:focusable="true"
android:background="?attr/selectableItemBackground">
<ImageView
android:src="?attr/iconAboutLicense"
app:srcCompat="?attr/iconAboutLicense"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center" />

View file

@ -36,7 +36,7 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:contentDescription="@null"
android:src="@drawable/ic_attachment_generic"
app:srcCompat="@drawable/ic_attachment_generic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/attachment_preview"
@ -101,7 +101,7 @@
android:layout_marginBottom="8dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/remove_attachment_action"
android:src="?attr/iconActionCancel"
app:srcCompat="?attr/iconActionCancel"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/attachment_preview" />

View file

@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:layout_marginBottom="4dp"
android:orientation="vertical"
tools:showIn="@layout/message_compose">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
@ -54,7 +53,7 @@
tools:visibility="visible"
android:inAnimation="@anim/fade_in"
android:outAnimation="@anim/fade_out"
custom:previewInitialChild="1">
app:previewInitialChild="1">
<ImageView
android:layout_width="wrap_content"
@ -62,7 +61,7 @@
android:layout_gravity="center_vertical"
android:layout_margin="8dp"
android:id="@+id/crypto_special_inline"
android:src="@drawable/compatibility"
app:srcCompat="@drawable/compatibility"
android:tint="@color/light_black"
/>
@ -72,7 +71,7 @@
android:layout_gravity="center"
android:layout_margin="8dp"
android:id="@+id/crypto_special_sign_only"
android:src="@drawable/status_signature"
app:srcCompat="@drawable/status_signature"
android:tint="?attr/openpgp_blue"
/>
@ -87,7 +86,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:src="@drawable/status_signature"
app:srcCompat="@drawable/status_signature"
android:tint="?attr/openpgp_blue"
/>
@ -95,7 +94,7 @@
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="right|bottom"
android:src="@drawable/compatibility"
app:srcCompat="@drawable/compatibility"
android:tint="@color/light_black"
/>
</FrameLayout>
@ -120,14 +119,14 @@
tools:visibility="visible"
android:inAnimation="@anim/fade_in"
android:outAnimation="@anim/fade_out"
custom:previewInitialChild="0">
app:previewInitialChild="0">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:id="@+id/crypto_status_disabled"
android:src="@drawable/status_lock_disabled"
app:srcCompat="@drawable/status_lock_disabled"
android:tint="?attr/openpgp_dark_grey"
/>
@ -136,7 +135,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:id="@+id/crypto_status_enabled"
android:src="@drawable/status_lock"
app:srcCompat="@drawable/status_lock"
android:tint="?attr/openpgp_green"
/>
@ -150,7 +149,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:src="@drawable/status_dots"
app:srcCompat="@drawable/status_dots"
android:tint="?attr/openpgp_grey"
/>
@ -158,7 +157,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:src="@drawable/status_lock_dots_3"
app:srcCompat="@drawable/status_lock_dots_3"
android:tint="?attr/openpgp_green"
/>
@ -169,7 +168,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:id="@+id/crypto_status_error"
android:src="@drawable/status_lock_error"
app:srcCompat="@drawable/status_lock_error"
android:tint="?attr/openpgp_red"
/>
@ -242,7 +241,7 @@
android:layout_height="match_parent"
android:padding="6dp"
android:scaleType="centerCrop"
android:src="?attr/iconActionExpand"
app:srcCompat="?attr/iconActionExpand"
android:id="@+id/recipient_expander"
/>

View file

@ -1,5 +1,6 @@
<?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"
@ -28,7 +29,7 @@
android:id="@+id/selected"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_check_circle_large"
app:srcCompat="@drawable/ic_check_circle_large"
android:visibility="gone"
android:contentDescription="@null" />
@ -78,13 +79,13 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="4dp"
android:src="@drawable/ic_account_color" />
app:srcCompat="@drawable/ic_account_color" />
<ImageView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="?attr/messageListAnswered"
app:srcCompat="?attr/messageListAnswered"
tools:src="@drawable/ic_messagelist_answered_light"/>
<TextView
@ -121,7 +122,7 @@
android:layout_height="wrap_content"
android:layout_alignTop="@+id/date"
android:layout_alignBottom="@+id/date"
android:src="?attr/messageListAttachment"
app:srcCompat="?attr/messageListAttachment"
android:layout_alignWithParentIfMissing="true"
android:layout_toStartOf="@+id/date" />

View file

@ -43,7 +43,7 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:contentDescription="@null"
android:src="@drawable/ic_attachment_generic"
app:srcCompat="@drawable/ic_attachment_generic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/attachment_preview"
@ -90,7 +90,7 @@
android:layout_marginBottom="8dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/remove_attachment_action"
android:src="?attr/iconActionSave"
app:srcCompat="?attr/iconActionSave"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/attachment_preview" />

View file

@ -31,7 +31,7 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:contentDescription="@null"
android:src="@drawable/status_signature_unknown"
app:srcCompat="@drawable/status_signature_unknown"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
@ -76,7 +76,7 @@
android:layout_marginBottom="8dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/locked_attach_unlock"
android:src="?attr/unencryptedAttachmentUnlock"
app:srcCompat="?attr/unencryptedAttachmentUnlock"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/locked_name"

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.fsck.k9.view.MessageHeader
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/header_container"
android:layout_width="match_parent"
@ -50,7 +51,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="6dp"
android:src="@drawable/status_lock_disabled"
app:srcCompat="@drawable/status_lock_disabled"
android:tint="?attr/openpgp_grey"
android:background="?selectableItemBackground"
android:visibility="gone"
@ -265,7 +266,7 @@
android:id="@+id/icon_single_message_options"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="?iconActionSingleMessageOptions"
app:srcCompat="?iconActionSingleMessageOptions"
android:padding="8dp"
android:background="?selectableItemBackground"
/>

View file

@ -1,5 +1,6 @@
<?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="wrap_content"
android:layout_height="wrap_content"
@ -20,7 +21,7 @@
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:src="@drawable/status_signature"
app:srcCompat="@drawable/status_signature"
android:scaleType="fitCenter"
android:tint="@color/light_black"
/>
@ -55,7 +56,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"
android:src="@drawable/status_lock_disabled"
app:srcCompat="@drawable/status_lock_disabled"
android:tint="?attr/openpgp_dark_grey"
/>
@ -63,14 +64,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="?attr/iconActionNextStatus"
app:srcCompat="?attr/iconActionNextStatus"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"
android:src="@drawable/status_lock"
app:srcCompat="@drawable/status_lock"
android:tint="?attr/openpgp_green"
/>
@ -94,4 +95,4 @@
android:text="@string/openpgp_description_text3"
/>
</LinearLayout>
</LinearLayout>

View file

@ -1,5 +1,6 @@
<?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="wrap_content"
android:layout_height="wrap_content"
@ -18,7 +19,7 @@
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:src="@drawable/compatibility"
app:srcCompat="@drawable/compatibility"
android:scaleType="fitCenter"
android:tint="@color/light_black"
/>
@ -116,4 +117,4 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -1,5 +1,6 @@
<?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="wrap_content"
android:layout_height="wrap_content"
@ -20,7 +21,7 @@
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:src="@drawable/status_signature"
app:srcCompat="@drawable/status_signature"
android:scaleType="fitCenter"
android:tint="@color/light_black"
/>
@ -144,4 +145,4 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -1,5 +1,6 @@
<?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"
@ -66,7 +67,7 @@
android:padding="8dp"
android:id="@+id/alternate_remove"
android:background="?android:selectableItemBackground"
android:src="?attr/iconActionCancel"
app:srcCompat="?attr/iconActionCancel"
/>
</LinearLayout>
@ -118,7 +119,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:src="@drawable/status_dots"
app:srcCompat="@drawable/status_dots"
android:tint="?attr/openpgp_grey"
/>
@ -139,7 +140,7 @@
android:layout_gravity="center_vertical"
android:layout_margin="13dp"
android:id="@+id/alternate_crypto_status_simple"
android:src="@drawable/status_lock"
app:srcCompat="@drawable/status_lock"
android:tint="?attr/openpgp_black"
android:visibility="gone"
tools:visibility="visible"

View file

@ -1,5 +1,6 @@
<?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"
@ -57,7 +58,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:src="@drawable/status_dots"
app:srcCompat="@drawable/status_dots"
android:tint="?attr/openpgp_grey"
/>
@ -78,10 +79,10 @@
android:layout_gravity="center_vertical"
android:layout_margin="13dp"
android:id="@+id/contact_crypto_status_icon_simple"
android:src="@drawable/status_lock"
app:srcCompat="@drawable/status_lock"
android:tint="?attr/openpgp_black"
android:visibility="gone"
tools:visibility="visible"
/>
</LinearLayout>
</LinearLayout>

View file

@ -1,5 +1,6 @@
<?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:orientation="horizontal"
android:layout_width="wrap_content"
@ -36,7 +37,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/contact_crypto_status_icon_simple"
android:src="@drawable/ic_status_corner"
app:srcCompat="@drawable/ic_status_corner"
android:visibility="gone"
android:tint="?openpgp_black"
tools:visibility="visible"
@ -46,7 +47,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/contact_crypto_status_icon_simple_enabled"
android:src="@drawable/ic_status_corner"
app:srcCompat="@drawable/ic_status_corner"
android:visibility="gone"
android:tint="?openpgp_green"
tools:visibility="visible"
@ -56,7 +57,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/contact_crypto_status_icon_simple_error"
android:src="@drawable/ic_status_corner"
app:srcCompat="@drawable/ic_status_corner"
android:visibility="gone"
android:tint="?openpgp_red"
tools:visibility="visible"
@ -69,7 +70,7 @@
android:layout_marginEnd="6dp"
android:layout_gravity="center_vertical"
android:id="@+id/contact_crypto_status_red"
android:src="@drawable/status_dots_1"
app:srcCompat="@drawable/status_dots_1"
android:tint="?attr/openpgp_red"
android:visibility="gone"
/>
@ -81,7 +82,7 @@
android:layout_marginEnd="6dp"
android:layout_gravity="center_vertical"
android:id="@+id/contact_crypto_status_orange"
android:src="@drawable/status_dots_2"
app:srcCompat="@drawable/status_dots_2"
android:tint="?attr/openpgp_orange"
android:visibility="gone"
/>
@ -93,11 +94,11 @@
android:layout_marginEnd="6dp"
android:layout_gravity="center_vertical"
android:id="@+id/contact_crypto_status_green"
android:src="@drawable/status_dots_3"
app:srcCompat="@drawable/status_dots_3"
android:tint="?attr/openpgp_green"
android:visibility="gone"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -26,7 +26,7 @@
android:layout_marginStart="16dp"
android:contentDescription="@null"
android:focusable="false"
android:src="?attr/iconSettingsImportStatus"
app:srcCompat="?attr/iconSettingsImportStatus"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"

View file

@ -25,7 +25,7 @@
android:layout_marginStart="16dp"
android:contentDescription="@null"
android:focusable="false"
android:src="?attr/iconSettingsImportStatus"
app:srcCompat="?attr/iconSettingsImportStatus"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"

View file

@ -1,10 +1,12 @@
<?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">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_chevron_right_black_24dp"
app:srcCompat="@drawable/ic_chevron_right_black_24dp"
android:tint="@color/status_todo_chevron"
/>
@ -17,15 +19,15 @@
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_check_black_24dp"
app:srcCompat="@drawable/ic_check_black_24dp"
android:tint="@color/status_ok_checkmark"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_close_black_24dp"
app:srcCompat="@drawable/ic_close_black_24dp"
android:tint="@color/status_error_cross"
/>
</merge>
</merge>

View file

@ -1,6 +1,7 @@
<?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"
@ -17,7 +18,7 @@
android:layout_height="40dp"
android:contentDescription="@string/account_settings_action"
android:padding="8dp"
android:src="?attr/iconActionSettings" />
app:srcCompat="?attr/iconActionSettings" />
<TextView
android:id="@+id/text"

View file

@ -18,17 +18,17 @@
</style>
<style name="PositiveBulletPoint">
<item name="android:src">@drawable/bullet_point_positive</item>
<item name="srcCompat">@drawable/bullet_point_positive</item>
<item name="android:tint">?attr/tintColorBulletPointPositive</item>
</style>
<style name="NeutralBulletPoint">
<item name="android:src">@drawable/bullet_point_neutral</item>
<item name="srcCompat">@drawable/bullet_point_neutral</item>
<item name="android:tint">?attr/tintColorBulletPointNeutral</item>
</style>
<style name="NegativeBulletPoint">
<item name="android:src">@drawable/bullet_point_negative</item>
<item name="srcCompat">@drawable/bullet_point_negative</item>
<item name="android:tint">?attr/tintColorBulletPointNegative</item>
</style>

View file

@ -9,6 +9,7 @@ import android.view.View
import android.widget.CheckBox
import android.widget.LinearLayout
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isGone
import androidx.core.view.isVisible
import com.fsck.k9.Account
@ -29,7 +30,7 @@ import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Ignore
import org.junit.Test
import org.robolectric.RuntimeEnvironment
import org.robolectric.Robolectric
private const val SOME_ACCOUNT_UUID = "6b84207b-25de-4dab-97c3-953bbf03fec6"
private const val FIRST_LINE_DEFAULT_FONT_SIZE = 18f
@ -37,7 +38,8 @@ private const val SECOND_LINE_DEFAULT_FONT_SIZE = 14f
private const val DATE_DEFAULT_FONT_SIZE = 14f
class MessageListAdapterTest : RobolectricTest() {
val context: Context = ContextThemeWrapper(RuntimeEnvironment.application, R.style.Theme_K9_Light)
val activity = Robolectric.buildActivity(AppCompatActivity::class.java).create().get()
val context: Context = ContextThemeWrapper(activity, R.style.Theme_K9_Light)
val contactsPictureLoader: ContactPictureLoader = mock()
val listItemListener: MessageListItemActionListener = mock()