diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle
index c93bdcb03..81df0b2c3 100644
--- a/app/k9mail/build.gradle
+++ b/app/k9mail/build.gradle
@@ -47,7 +47,7 @@ android {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk
- generatedDensities = ['mdpi', 'hdpi', 'xhdpi']
+ vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
diff --git a/app/ui/src/main/res/layout/account_list_item.xml b/app/ui/src/main/res/layout/account_list_item.xml
index d131e49cc..6edede8f2 100644
--- a/app/ui/src/main/res/layout/account_list_item.xml
+++ b/app/ui/src/main/res/layout/account_list_item.xml
@@ -1,5 +1,6 @@
+ app:srcCompat="?attr/iconSettingsAccount" />
+ app:srcCompat="@drawable/ic_drafts_folder_light"/>
-
+
+ app:srcCompat="?attr/iconActionCancel" />
-
\ No newline at end of file
+
diff --git a/app/ui/src/main/res/layout/foldable_linearlayout.xml b/app/ui/src/main/res/layout/foldable_linearlayout.xml
index fafa3074d..7b684afdd 100644
--- a/app/ui/src/main/res/layout/foldable_linearlayout.xml
+++ b/app/ui/src/main/res/layout/foldable_linearlayout.xml
@@ -1,5 +1,6 @@
@@ -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" />
-
\ No newline at end of file
+
diff --git a/app/ui/src/main/res/layout/folder_list_item.xml b/app/ui/src/main/res/layout/folder_list_item.xml
index ab9dc3699..61b48cd1e 100644
--- a/app/ui/src/main/res/layout/folder_list_item.xml
+++ b/app/ui/src/main/res/layout/folder_list_item.xml
@@ -1,5 +1,6 @@
+ app:srcCompat="@drawable/ic_drafts_folder_light" />
@@ -14,7 +15,7 @@
android:layout_width="fill_parent">
@@ -81,7 +82,7 @@
android:focusable="true"
android:background="?attr/selectableItemBackground">
@@ -118,7 +119,7 @@
android:focusable="true"
android:background="?attr/selectableItemBackground">
diff --git a/app/ui/src/main/res/layout/message_compose_attachment.xml b/app/ui/src/main/res/layout/message_compose_attachment.xml
index 77a94f8c0..84aba9911 100644
--- a/app/ui/src/main/res/layout/message_compose_attachment.xml
+++ b/app/ui/src/main/res/layout/message_compose_attachment.xml
@@ -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" />
diff --git a/app/ui/src/main/res/layout/message_compose_recipients.xml b/app/ui/src/main/res/layout/message_compose_recipients.xml
index df38056bf..160b6ca38 100644
--- a/app/ui/src/main/res/layout/message_compose_recipients.xml
+++ b/app/ui/src/main/res/layout/message_compose_recipients.xml
@@ -1,13 +1,12 @@
+ android:orientation="vertical">
+ app:previewInitialChild="1">
@@ -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"
/>
@@ -120,14 +119,14 @@
tools:visibility="visible"
android:inAnimation="@anim/fade_in"
android:outAnimation="@anim/fade_out"
- custom:previewInitialChild="0">
+ app:previewInitialChild="0">
@@ -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"
/>
diff --git a/app/ui/src/main/res/layout/message_list_item.xml b/app/ui/src/main/res/layout/message_list_item.xml
index 8db2887cd..26a07ba37 100644
--- a/app/ui/src/main/res/layout/message_list_item.xml
+++ b/app/ui/src/main/res/layout/message_list_item.xml
@@ -1,5 +1,6 @@
@@ -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" />
diff --git a/app/ui/src/main/res/layout/message_view_attachment.xml b/app/ui/src/main/res/layout/message_view_attachment.xml
index 61ede8729..66f4d9ac4 100644
--- a/app/ui/src/main/res/layout/message_view_attachment.xml
+++ b/app/ui/src/main/res/layout/message_view_attachment.xml
@@ -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" />
diff --git a/app/ui/src/main/res/layout/message_view_attachment_locked.xml b/app/ui/src/main/res/layout/message_view_attachment_locked.xml
index 291c904e1..28a51897c 100644
--- a/app/ui/src/main/res/layout/message_view_attachment_locked.xml
+++ b/app/ui/src/main/res/layout/message_view_attachment_locked.xml
@@ -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"
diff --git a/app/ui/src/main/res/layout/message_view_header.xml b/app/ui/src/main/res/layout/message_view_header.xml
index 9099329fe..6bb29ddf8 100644
--- a/app/ui/src/main/res/layout/message_view_header.xml
+++ b/app/ui/src/main/res/layout/message_view_header.xml
@@ -1,6 +1,7 @@
diff --git a/app/ui/src/main/res/layout/openpgp_encrypt_description_dialog.xml b/app/ui/src/main/res/layout/openpgp_encrypt_description_dialog.xml
index 8381c82cf..6825c4dad 100644
--- a/app/ui/src/main/res/layout/openpgp_encrypt_description_dialog.xml
+++ b/app/ui/src/main/res/layout/openpgp_encrypt_description_dialog.xml
@@ -1,5 +1,6 @@
@@ -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"
/>
@@ -94,4 +95,4 @@
android:text="@string/openpgp_description_text3"
/>
-
\ No newline at end of file
+
diff --git a/app/ui/src/main/res/layout/openpgp_inline_dialog.xml b/app/ui/src/main/res/layout/openpgp_inline_dialog.xml
index b46ef2ad3..98724ac6b 100644
--- a/app/ui/src/main/res/layout/openpgp_inline_dialog.xml
+++ b/app/ui/src/main/res/layout/openpgp_inline_dialog.xml
@@ -1,5 +1,6 @@
@@ -116,4 +117,4 @@
-
\ No newline at end of file
+
diff --git a/app/ui/src/main/res/layout/openpgp_sign_only_dialog.xml b/app/ui/src/main/res/layout/openpgp_sign_only_dialog.xml
index f323e4d01..27134d5ed 100644
--- a/app/ui/src/main/res/layout/openpgp_sign_only_dialog.xml
+++ b/app/ui/src/main/res/layout/openpgp_sign_only_dialog.xml
@@ -1,5 +1,6 @@
@@ -144,4 +145,4 @@
-
\ No newline at end of file
+
diff --git a/app/ui/src/main/res/layout/recipient_alternate_item.xml b/app/ui/src/main/res/layout/recipient_alternate_item.xml
index 49c7876a8..d92e47fc1 100644
--- a/app/ui/src/main/res/layout/recipient_alternate_item.xml
+++ b/app/ui/src/main/res/layout/recipient_alternate_item.xml
@@ -1,5 +1,6 @@
@@ -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"
diff --git a/app/ui/src/main/res/layout/recipient_dropdown_item.xml b/app/ui/src/main/res/layout/recipient_dropdown_item.xml
index b4badedfe..b0a5a0d1a 100644
--- a/app/ui/src/main/res/layout/recipient_dropdown_item.xml
+++ b/app/ui/src/main/res/layout/recipient_dropdown_item.xml
@@ -1,5 +1,6 @@
@@ -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"
/>
-
\ No newline at end of file
+
diff --git a/app/ui/src/main/res/layout/recipient_token_item.xml b/app/ui/src/main/res/layout/recipient_token_item.xml
index e93ea92b1..26f5838b9 100644
--- a/app/ui/src/main/res/layout/recipient_token_item.xml
+++ b/app/ui/src/main/res/layout/recipient_token_item.xml
@@ -1,5 +1,6 @@
@@ -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"
/>
-
\ No newline at end of file
+
diff --git a/app/ui/src/main/res/layout/settings_import_account_list_item.xml b/app/ui/src/main/res/layout/settings_import_account_list_item.xml
index 52bcf42bb..050e1c943 100644
--- a/app/ui/src/main/res/layout/settings_import_account_list_item.xml
+++ b/app/ui/src/main/res/layout/settings_import_account_list_item.xml
@@ -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"
diff --git a/app/ui/src/main/res/layout/settings_import_general_list_item.xml b/app/ui/src/main/res/layout/settings_import_general_list_item.xml
index 66fefc6b5..4ea6f3183 100644
--- a/app/ui/src/main/res/layout/settings_import_general_list_item.xml
+++ b/app/ui/src/main/res/layout/settings_import_general_list_item.xml
@@ -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"
diff --git a/app/ui/src/main/res/layout/status_indicator.xml b/app/ui/src/main/res/layout/status_indicator.xml
index 4b453f783..0f20f0746 100644
--- a/app/ui/src/main/res/layout/status_indicator.xml
+++ b/app/ui/src/main/res/layout/status_indicator.xml
@@ -1,10 +1,12 @@
-
+
@@ -17,15 +19,15 @@
-
\ No newline at end of file
+
diff --git a/app/ui/src/main/res/layout/text_icon_list_item.xml b/app/ui/src/main/res/layout/text_icon_list_item.xml
index d6616bb6a..ae8460b9e 100644
--- a/app/ui/src/main/res/layout/text_icon_list_item.xml
+++ b/app/ui/src/main/res/layout/text_icon_list_item.xml
@@ -1,6 +1,7 @@
+ app:srcCompat="?attr/iconActionSettings" />
diff --git a/app/ui/src/test/java/com/fsck/k9/fragment/MessageListAdapterTest.kt b/app/ui/src/test/java/com/fsck/k9/fragment/MessageListAdapterTest.kt
index 1f7ca204d..74ddeceb6 100644
--- a/app/ui/src/test/java/com/fsck/k9/fragment/MessageListAdapterTest.kt
+++ b/app/ui/src/test/java/com/fsck/k9/fragment/MessageListAdapterTest.kt
@@ -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()