From 0ead86fc74f40d4f5ec0603146b82110019108b9 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Thu, 6 Jun 2024 05:40:01 +0000 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/2133 - Add destructive text color to delete history button UltraBlame original commit: 643bc2c079b82be721d14866942577493444f282 --- .../HistoryDeleteButtonViewHolder.kt | 7 - .../main/res/layout/delete_history_button.xml | 179 +++++++++--------- 2 files changed, 87 insertions(+), 99 deletions(-) diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/history/viewholders/HistoryDeleteButtonViewHolder.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/history/viewholders/HistoryDeleteButtonViewHolder.kt index cc009e42205c..bee6bcd454e8 100644 --- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/history/viewholders/HistoryDeleteButtonViewHolder.kt +++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/history/viewholders/HistoryDeleteButtonViewHolder.kt @@ -167,13 +167,6 @@ Mode null private val -textView -= -view -. -delete_history_button_text -private -val buttonView = view diff --git a/mobile/android/fenix/app/src/main/res/layout/delete_history_button.xml b/mobile/android/fenix/app/src/main/res/layout/delete_history_button.xml index f3e8d8ed08f1..128f042fe8f4 100644 --- a/mobile/android/fenix/app/src/main/res/layout/delete_history_button.xml +++ b/mobile/android/fenix/app/src/main/res/layout/delete_history_button.xml @@ -79,7 +79,17 @@ MPL - > < -FrameLayout +com +. +google +. +android +. +material +. +button +. +MaterialButton xmlns : android @@ -101,64 +111,49 @@ res / android " -android -: -id -= -" -+ -id -/ -delete_history_button -" -android +xmlns : -foreground +app = " -? -android +http : -attr / -selectableItemBackground -" -android -: -background -= -" -drawable / -button_background -" -android -: -layout_margin -= -" -16dp -" +schemas +. android -: -padding -= -" -6dp +. +com +/ +apk +/ +res +- +auto " android : -clickable +id = " -true ++ +id +/ +delete_history_button " -android -: -focusable +style = " -true +style +/ +Widget +. +MaterialComponents +. +Button +. +TextButton " android : @@ -174,39 +169,28 @@ layout_height " wrap_content " -> -< -TextView android : -id -= -" -+ -id -/ -delete_history_button_text -" -android -: -layout_width +layout_margin = " -wrap_content +16dp " android : -layout_height +background = " -wrap_content +drawable +/ +button_background " android : -layout_gravity +letterSpacing = " -center +0 " android : @@ -219,10 +203,10 @@ history_delete_all " android : -gravity +textAllCaps = " -center +false " android : @@ -230,63 +214,74 @@ textColor = " ? -primaryText +destructive " android : -textSize +textStyle = " -16sp +bold " android : -textStyle +theme = " -bold +style +/ +Theme +. +MaterialComponents +. +Light " -android +app : -clickable +backgroundTint = " -false +? +neutral " -android +app : -focusable +icon = " -false +drawable +/ +ic_delete " -android +app : -drawableTint +iconGravity = " -? -primaryText +textStart " -android +app : -drawableStart +iconPadding = " -drawable -/ -ic_delete +8dp " -android +app : -drawablePadding +iconTint = " -12dp +? +destructive +" +app +: +rippleColor += +" +? +secondaryText " / > -< -/ -FrameLayout ->