diff --git a/app/common/src/main/res/menu/unread_widget_option.xml b/app/common/src/main/res/menu/unread_widget_option.xml index 1033e42af..9e827f65d 100644 --- a/app/common/src/main/res/menu/unread_widget_option.xml +++ b/app/common/src/main/res/menu/unread_widget_option.xml @@ -5,6 +5,6 @@ android:id="@+id/done" android:title="@string/unread_widget_action_done" app:showAsAction="always" - android:icon="?attr/iconActionSave" + android:icon="@drawable/ic_floppy" /> - \ No newline at end of file + diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt index f01616905..ea8f7d852 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt @@ -18,7 +18,7 @@ import android.view.ViewGroup import android.view.inputmethod.InputMethodManager import android.widget.Toast import androidx.core.app.ActivityCompat -import androidx.core.content.withStyledAttributes +import androidx.core.content.ContextCompat import androidx.fragment.app.DialogFragment import androidx.fragment.app.Fragment import androidx.fragment.app.setFragmentResultListener @@ -240,16 +240,14 @@ class MessageViewFragment : menu.findItem(R.id.toggle_unread).setTitle(R.string.mark_as_read_action) } - val drawableAttr = if (isMessageRead) { - intArrayOf(R.attr.iconActionMarkAsUnread) + val drawableId = if (isMessageRead) { + R.drawable.ic_mark_new } else { - intArrayOf(R.attr.iconActionMarkAsRead) + R.drawable.ic_opened_envelope } - val toolbarContext = requireActivity().findViewById(R.id.toolbar).context - toolbarContext.withStyledAttributes(attrs = drawableAttr) { - menu.findItem(R.id.toggle_unread).icon = getDrawable(0) - } + val drawable = ContextCompat.getDrawable(requireContext(), drawableId) + menu.findItem(R.id.toggle_unread).icon = drawable } if (isMoveCapable) { @@ -588,9 +586,11 @@ class MessageViewFragment : MessageDetailsFragment.ACTION_SEARCH_KEYS -> { messageCryptoPresenter.onClickSearchKey() } + MessageDetailsFragment.ACTION_SHOW_WARNING -> { messageCryptoPresenter.onClickShowCryptoWarningDetails() } + else -> { error("Unsupported action: $action") } @@ -691,6 +691,7 @@ class MessageViewFragment : cancelText, ) } + R.id.dialog_confirm_spam -> { val title = getString(R.string.dialog_confirm_spam_title) val message = resources.getQuantityString(R.plurals.dialog_confirm_spam_message, 1) @@ -704,6 +705,7 @@ class MessageViewFragment : cancelText, ) } + R.id.dialog_attachment_progress -> { val currentAttachmentViewInfo = checkNotNull(this.currentAttachmentViewInfo) @@ -711,6 +713,7 @@ class MessageViewFragment : val size = currentAttachmentViewInfo.size AttachmentDownloadDialogFragment.newInstance(size, message) } + else -> { throw RuntimeException("Called showDialog(int) with unknown dialog id.") } @@ -787,9 +790,11 @@ class MessageViewFragment : putExtra(MessageCompose.EXTRA_ACCOUNT, messageReference.accountUuid) } } + is HttpsUnsubscribeUri -> { Intent(Intent.ACTION_VIEW, unsubscribeUri.uri) } + else -> error("Unknown UnsubscribeUri - $unsubscribeUri") } diff --git a/app/ui/legacy/src/main/res/drawable-hdpi/ic_action_request_read_receipt_dark.png b/app/ui/legacy/src/main/res/drawable-hdpi/ic_action_request_read_receipt_dark.png deleted file mode 100644 index 1950ff406..000000000 Binary files a/app/ui/legacy/src/main/res/drawable-hdpi/ic_action_request_read_receipt_dark.png and /dev/null differ diff --git a/app/ui/legacy/src/main/res/drawable-mdpi/ic_action_request_read_receipt_dark.png b/app/ui/legacy/src/main/res/drawable-mdpi/ic_action_request_read_receipt_dark.png deleted file mode 100644 index 6d9102c7d..000000000 Binary files a/app/ui/legacy/src/main/res/drawable-mdpi/ic_action_request_read_receipt_dark.png and /dev/null differ diff --git a/app/ui/legacy/src/main/res/drawable-xhdpi/ic_action_request_read_receipt_dark.png b/app/ui/legacy/src/main/res/drawable-xhdpi/ic_action_request_read_receipt_dark.png deleted file mode 100644 index f39686cb3..000000000 Binary files a/app/ui/legacy/src/main/res/drawable-xhdpi/ic_action_request_read_receipt_dark.png and /dev/null differ diff --git a/app/ui/legacy/src/main/res/layout/message_compose_attachment.xml b/app/ui/legacy/src/main/res/layout/message_compose_attachment.xml index adae3522e..54c61c229 100644 --- a/app/ui/legacy/src/main/res/layout/message_compose_attachment.xml +++ b/app/ui/legacy/src/main/res/layout/message_compose_attachment.xml @@ -99,7 +99,7 @@ android:layout_marginBottom="8dp" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/remove_attachment_action" - app:srcCompat="?attr/iconActionCancel" + app:srcCompat="@drawable/ic_clear" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/progressBar" diff --git a/app/ui/legacy/src/main/res/layout/message_compose_recipients.xml b/app/ui/legacy/src/main/res/layout/message_compose_recipients.xml index ddffa5133..1c20668b2 100644 --- a/app/ui/legacy/src/main/res/layout/message_compose_recipients.xml +++ b/app/ui/legacy/src/main/res/layout/message_compose_recipients.xml @@ -181,7 +181,7 @@ android:layout_height="match_parent" android:padding="6dp" android:scaleType="centerCrop" - app:srcCompat="?attr/iconActionExpand" /> + app:srcCompat="@drawable/ic_chevron_down" /> diff --git a/app/ui/legacy/src/main/res/layout/message_list_fragment.xml b/app/ui/legacy/src/main/res/layout/message_list_fragment.xml index 45ee0ebcb..0b9268298 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_fragment.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_fragment.xml @@ -33,7 +33,7 @@ android:layout_margin="@dimen/floatingActionButtonMargin" android:contentDescription="@string/compose_action" app:layout_behavior="com.fsck.k9.ui.fab.HideFabOnScrollBehavior" - app:srcCompat="?attr/iconActionCompose" + app:srcCompat="@drawable/ic_pencil" /> diff --git a/app/ui/legacy/src/main/res/layout/message_view_attachment.xml b/app/ui/legacy/src/main/res/layout/message_view_attachment.xml index 52d09b52a..f959e0ac4 100644 --- a/app/ui/legacy/src/main/res/layout/message_view_attachment.xml +++ b/app/ui/legacy/src/main/res/layout/message_view_attachment.xml @@ -90,7 +90,7 @@ android:layout_marginBottom="8dp" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/remove_attachment_action" - app:srcCompat="?attr/iconActionSaveAttachment" + app:srcCompat="@drawable/ic_download" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/attachment_preview" /> diff --git a/app/ui/legacy/src/main/res/layout/openpgp_encrypt_description_dialog.xml b/app/ui/legacy/src/main/res/layout/openpgp_encrypt_description_dialog.xml index cca575f8d..7cc150f3b 100644 --- a/app/ui/legacy/src/main/res/layout/openpgp_encrypt_description_dialog.xml +++ b/app/ui/legacy/src/main/res/layout/openpgp_encrypt_description_dialog.xml @@ -65,7 +65,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - app:srcCompat="?attr/iconActionNextStatus" + app:srcCompat="@drawable/ic_chevron_right" /> diff --git a/app/ui/legacy/src/main/res/layout/text_icon_list_item.xml b/app/ui/legacy/src/main/res/layout/text_icon_list_item.xml index c3c77f8d6..faf18f624 100644 --- a/app/ui/legacy/src/main/res/layout/text_icon_list_item.xml +++ b/app/ui/legacy/src/main/res/layout/text_icon_list_item.xml @@ -24,7 +24,7 @@ android:layout_height="40dp" android:contentDescription="@string/account_settings_action" android:padding="8dp" - app:srcCompat="?attr/iconActionSettings" /> + app:srcCompat="@drawable/ic_cog" /> @@ -22,7 +22,7 @@ android:title="@string/folder_list_display_mode_not_second_class" /> diff --git a/app/ui/legacy/src/main/res/menu/folder_list_option.xml b/app/ui/legacy/src/main/res/menu/folder_list_option.xml index 2f861c3b8..75f30c10a 100644 --- a/app/ui/legacy/src/main/res/menu/folder_list_option.xml +++ b/app/ui/legacy/src/main/res/menu/folder_list_option.xml @@ -3,12 +3,12 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> diff --git a/app/ui/legacy/src/main/res/menu/general_settings_option.xml b/app/ui/legacy/src/main/res/menu/general_settings_option.xml index e32677ed8..298cc51af 100644 --- a/app/ui/legacy/src/main/res/menu/general_settings_option.xml +++ b/app/ui/legacy/src/main/res/menu/general_settings_option.xml @@ -5,7 +5,7 @@ diff --git a/app/ui/legacy/src/main/res/menu/manage_identities_option.xml b/app/ui/legacy/src/main/res/menu/manage_identities_option.xml index 676b48be6..a6328e877 100644 --- a/app/ui/legacy/src/main/res/menu/manage_identities_option.xml +++ b/app/ui/legacy/src/main/res/menu/manage_identities_option.xml @@ -3,6 +3,6 @@ diff --git a/app/ui/legacy/src/main/res/menu/message_compose_option.xml b/app/ui/legacy/src/main/res/menu/message_compose_option.xml index 38d13b446..85a4966dd 100644 --- a/app/ui/legacy/src/main/res/menu/message_compose_option.xml +++ b/app/ui/legacy/src/main/res/menu/message_compose_option.xml @@ -4,13 +4,13 @@ diff --git a/app/ui/legacy/src/main/res/menu/message_list_option.xml b/app/ui/legacy/src/main/res/menu/message_list_option.xml index 7d57918c3..78ae2a971 100644 --- a/app/ui/legacy/src/main/res/menu/message_list_option.xml +++ b/app/ui/legacy/src/main/res/menu/message_list_option.xml @@ -11,7 +11,7 @@ @@ -19,7 +19,7 @@ @@ -27,7 +27,7 @@ @@ -35,7 +35,7 @@ @@ -43,7 +43,7 @@ @@ -51,7 +51,7 @@ @@ -59,7 +59,7 @@ @@ -67,7 +67,7 @@ @@ -121,14 +121,14 @@ @@ -159,7 +159,7 @@ @@ -172,7 +172,7 @@ diff --git a/app/ui/legacy/src/main/res/values/attrs.xml b/app/ui/legacy/src/main/res/values/attrs.xml index 64d15fbb5..4e75c4bea 100644 --- a/app/ui/legacy/src/main/res/values/attrs.xml +++ b/app/ui/legacy/src/main/res/values/attrs.xml @@ -2,55 +2,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/ui/legacy/src/main/res/values/themes.xml b/app/ui/legacy/src/main/res/values/themes.xml index 3cefe7ee6..ef6621d57 100644 --- a/app/ui/legacy/src/main/res/values/themes.xml +++ b/app/ui/legacy/src/main/res/values/themes.xml @@ -66,55 +66,6 @@ @style/PreferenceThemeOverlay - @drawable/ic_folder - @drawable/ic_inbox - @drawable/ic_outbox - @drawable/ic_archive - @drawable/ic_drafts_folder - @drawable/ic_send - @drawable/ic_alert_octagon - @drawable/ic_trash_can - @drawable/ic_attachment - @drawable/ic_archive - @drawable/ic_pencil - @drawable/ic_trash_can - @drawable/ic_move_to_folder - @drawable/ic_content_copy - @drawable/ic_chevron_right - @drawable/ic_refresh - @drawable/ic_magnify - @drawable/ic_folder_magnify - @drawable/ic_send - @drawable/ic_cog - @drawable/ic_sort - @drawable/ic_alert_octagon - @drawable/ic_star - @drawable/ic_star_outline - @drawable/ic_opened_envelope - @drawable/ic_mark_new - @drawable/ic_magnify_cloud - @drawable/ic_plus - @drawable/ic_arrow_up_down - @drawable/ic_file_upload - @drawable/ic_select_all - @drawable/ic_floppy - @drawable/ic_download - @drawable/ic_clear - @drawable/ic_action_request_read_receipt_light - @drawable/ic_chevron_down - @drawable/ic_chevron_up - @drawable/ic_tv - @drawable/ic_touch - @drawable/ic_notifications - @drawable/ic_arrow_up_down - @drawable/ic_shield - @drawable/ic_bug - @drawable/ic_folder - @drawable/ic_magnify - @drawable/ic_preferences_crypto - @drawable/ic_preferences_check_mail - @drawable/ic_opened_envelope - @drawable/ic_pencil @drawable/ic_info @drawable/ic_cog @drawable/ic_account @@ -151,19 +102,19 @@ @color/material_gray_200 @drawable/ic_check_circle @color/material_blue_600 - ?attr/iconActionMarkAsRead - ?attr/iconActionMarkAsUnread + @drawable/ic_opened_envelope + @drawable/ic_mark_new @color/material_blue_600 - ?attr/iconActionFlag - ?attr/iconActionUnflag + @drawable/ic_star + @drawable/ic_star_outline @color/material_orange_600 - ?attr/iconActionArchive + @drawable/ic_archive @color/material_green_600 - ?attr/iconActionDelete + @drawable/ic_trash_can @color/material_red_600 - ?attr/iconActionSpam + @drawable/ic_alert_octagon @color/material_red_700 - ?attr/iconActionMove + @drawable/ic_move_to_folder @color/material_purple_500 #fbbc04 @@ -267,55 +218,6 @@ @style/PreferenceThemeOverlay - @drawable/ic_folder - @drawable/ic_inbox - @drawable/ic_outbox - @drawable/ic_archive - @drawable/ic_drafts_folder - @drawable/ic_send - @drawable/ic_alert_octagon - @drawable/ic_trash_can - @drawable/ic_attachment - @drawable/ic_archive - @drawable/ic_pencil - @drawable/ic_trash_can - @drawable/ic_folder - @drawable/ic_content_copy - @drawable/ic_chevron_right - @drawable/ic_refresh - @drawable/ic_magnify - @drawable/ic_folder_magnify - @drawable/ic_send - @drawable/ic_cog - @drawable/ic_sort - @drawable/ic_alert_octagon - @drawable/ic_star - @drawable/ic_star_outline - @drawable/ic_opened_envelope - @drawable/ic_mark_new - @drawable/ic_magnify_cloud - @drawable/ic_plus - @drawable/ic_arrow_up_down - @drawable/ic_file_upload - @drawable/ic_select_all - @drawable/ic_floppy - @drawable/ic_download - @drawable/ic_clear - @drawable/ic_action_request_read_receipt_dark - @drawable/ic_chevron_down - @drawable/ic_chevron_up - @drawable/ic_tv - @drawable/ic_touch - @drawable/ic_notifications - @drawable/ic_arrow_up_down - @drawable/ic_shield - @drawable/ic_bug - @drawable/ic_folder - @drawable/ic_magnify - @drawable/ic_preferences_crypto - @drawable/ic_preferences_check_mail - @drawable/ic_opened_envelope - @drawable/ic_pencil @drawable/ic_info @drawable/ic_cog @drawable/ic_account @@ -351,19 +253,19 @@ @color/material_gray_900 @drawable/ic_check_circle @color/material_blue_700 - ?attr/iconActionMarkAsRead - ?attr/iconActionMarkAsUnread + @drawable/ic_opened_envelope + @drawable/ic_mark_new @color/material_blue_700 - ?attr/iconActionFlag - ?attr/iconActionUnflag + @drawable/ic_star + @drawable/ic_star_outline @color/material_orange_700 - ?attr/iconActionArchive + @drawable/ic_archive @color/material_green_700 - ?attr/iconActionDelete + @drawable/ic_trash_can @color/material_red_700 - ?attr/iconActionSpam + @drawable/ic_alert_octagon @color/material_red_800 - ?attr/iconActionMove + @drawable/ic_move_to_folder @color/material_purple_600 #fdd663 diff --git a/app/ui/legacy/src/main/res/xml/account_settings.xml b/app/ui/legacy/src/main/res/xml/account_settings.xml index ffef29a1b..0510b076e 100644 --- a/app/ui/legacy/src/main/res/xml/account_settings.xml +++ b/app/ui/legacy/src/main/res/xml/account_settings.xml @@ -7,7 +7,7 @@ android:title="@string/account_settings_title_fmt"> @@ -25,7 +25,7 @@ @@ -45,7 +45,7 @@ @@ -152,7 +152,7 @@ @@ -228,7 +228,7 @@ @@ -293,7 +293,7 @@ @@ -378,7 +378,7 @@ @@ -393,7 +393,7 @@ diff --git a/app/ui/legacy/src/main/res/xml/general_settings.xml b/app/ui/legacy/src/main/res/xml/general_settings.xml index 4368c7d6f..a94f851f2 100644 --- a/app/ui/legacy/src/main/res/xml/general_settings.xml +++ b/app/ui/legacy/src/main/res/xml/general_settings.xml @@ -8,7 +8,7 @@ search:ignore="true"> @@ -305,7 +305,7 @@ @@ -364,7 +364,7 @@ @@ -415,7 +415,7 @@ @@ -431,7 +431,7 @@ @@ -449,7 +449,7 @@