From 7368c7911e2f64ccbc24192f461cc5862cd45d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolf-Martell=20Montw=C3=A9?= Date: Wed, 29 May 2024 12:02:21 +0200 Subject: [PATCH 1/4] Change Button to MaterialButton --- .../fsck/k9/ui/compose/QuotedMessageMvpView.java | 11 +++++------ .../com/fsck/k9/ui/messageview/MessageTopView.kt | 6 +++--- .../java/com/fsck/k9/ui/push/PushInfoFragment.kt | 8 ++++---- .../src/main/res/layout/crypto_key_transfer.xml | 4 ++-- .../src/main/res/layout/fragment_push_info.xml | 6 +++--- .../main/res/layout/fragment_settings_export.xml | 4 ++-- app/ui/legacy/src/main/res/layout/message.xml | 5 +++-- .../main/res/layout/message_compose_content.xml | 2 +- .../layout/message_content_crypto_cancelled.xml | 4 ++-- .../layout/message_content_crypto_no_provider.xml | 4 ++-- .../settings/import/ui/SettingsImportFragment.kt | 14 ++++++++++++-- .../src/main/res/layout/account_setup_oauth.xml | 2 +- .../main/res/layout/fragment_settings_import.xml | 6 +++--- 13 files changed, 43 insertions(+), 33 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java b/app/ui/legacy/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java index adcc5687dd4..55e0f3daa4a 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java @@ -6,29 +6,28 @@ import android.view.View.OnClickListener; import android.webkit.WebView; import android.webkit.WebViewClient; -import android.widget.Button; import android.widget.EditText; -import android.widget.ImageButton; import com.fsck.k9.DI; import com.fsck.k9.FontSizes; -import com.fsck.k9.helper.CrLfConverter; -import com.fsck.k9.message.html.DisplayHtml; -import com.fsck.k9.ui.R; import com.fsck.k9.activity.MessageCompose; +import com.fsck.k9.helper.CrLfConverter; import com.fsck.k9.mailstore.AttachmentResolver; import com.fsck.k9.message.QuotedTextMode; import com.fsck.k9.message.SimpleMessageFormat; +import com.fsck.k9.message.html.DisplayHtml; +import com.fsck.k9.ui.R; import com.fsck.k9.ui.helper.DisplayHtmlUiFactory; import com.fsck.k9.view.MessageWebView; import com.fsck.k9.view.WebViewConfigProvider; +import com.google.android.material.button.MaterialButton; public class QuotedMessageMvpView { private final DisplayHtml displayHtml = DI.get(DisplayHtmlUiFactory.class).createForMessageCompose(); private final WebViewConfigProvider webViewConfigProvider = DI.get(WebViewConfigProvider.class); - private final Button mQuotedTextShow; + private final MaterialButton mQuotedTextShow; private final View mQuotedTextBar; private final View mQuotedTextEdit; private final EditText mQuotedText; diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.kt index c55613365a2..ea07a6402c8 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.kt @@ -12,7 +12,6 @@ import android.util.AttributeSet import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.Button import android.widget.ImageView import android.widget.LinearLayout import android.widget.ProgressBar @@ -30,6 +29,7 @@ import com.fsck.k9.ui.messageview.MessageContainerView.OnRenderingFinishedListen import com.fsck.k9.view.MessageHeader import com.fsck.k9.view.ThemeUtils import com.fsck.k9.view.ToolableViewAnimator +import com.google.android.material.button.MaterialButton import org.koin.core.component.KoinComponent import org.koin.core.component.inject @@ -49,10 +49,10 @@ class MessageTopView( lateinit var messageHeaderView: MessageHeader private lateinit var containerView: ViewGroup - private lateinit var downloadRemainderButton: Button + private lateinit var downloadRemainderButton: MaterialButton private lateinit var attachmentCallback: AttachmentViewCallback private lateinit var extraHeaderContainer: View - private lateinit var showPicturesButton: Button + private lateinit var showPicturesButton: MaterialButton private var isShowingProgress = false private var showPicturesButtonClicked = false diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/push/PushInfoFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/push/PushInfoFragment.kt index 247f9ca740b..bfbf52acde1 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/push/PushInfoFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/push/PushInfoFragment.kt @@ -9,7 +9,6 @@ import android.provider.Settings import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.Button import android.widget.TextView import android.widget.Toast import androidx.annotation.RequiresApi @@ -18,6 +17,7 @@ import androidx.fragment.app.Fragment import com.fsck.k9.controller.push.PushController import com.fsck.k9.notification.NotificationChannelManager import com.fsck.k9.ui.R +import com.google.android.material.button.MaterialButton import org.koin.android.ext.android.inject private const val LEARN_MORE_URL = "https://k9mail.app/go/push-info" @@ -43,7 +43,7 @@ class PushInfoFragment : Fragment() { R.string.push_info_notification_explanation_text, configureNotificationText, ) - val configureNotificationButton = view.findViewById