diff --git a/app/src/main/java/org/mozilla/fenix/library/history/HistoryAdapter.kt b/app/src/main/java/org/mozilla/fenix/library/history/HistoryAdapter.kt
index ce9eb1c98e..6f76f4de2d 100644
--- a/app/src/main/java/org/mozilla/fenix/library/history/HistoryAdapter.kt
+++ b/app/src/main/java/org/mozilla/fenix/library/history/HistoryAdapter.kt
@@ -125,12 +125,14 @@ class HistoryAdapter(
}
fun bind(mode: HistoryState.Mode) {
- when(mode) {
- is HistoryState.Mode.Normal ->
- text.text = text.context.resources.getText(R.string.delete_history)
- is HistoryState.Mode.Editing ->
- text.text = text.context.resources.getString(R.string.delete_history_items, mode.selectedItems.size)
+ val text = if (mode is HistoryState.Mode.Editing && mode.selectedItems.isNotEmpty()) {
+ text.context.resources.getString(R.string.delete_history_items, mode.selectedItems.size)
+ } else {
+ text.context.resources.getString(R.string.delete_history)
}
+
+ button.contentDescription = text
+ this.text.text = text
}
companion object {
diff --git a/app/src/main/res/layout/history_delete.xml b/app/src/main/res/layout/history_delete.xml
index 8255aa218e..abefe9f8bc 100644
--- a/app/src/main/res/layout/history_delete.xml
+++ b/app/src/main/res/layout/history_delete.xml
@@ -4,9 +4,12 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
@@ -19,5 +22,7 @@
android:drawablePadding="8dp"
android:textSize="16sp"
android:gravity="center"
+ android:clickable="false"
+ android:focusable="false"
android:layout_gravity="center" />
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index ef6520013e..89a38dbf20 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -152,5 +152,5 @@
- Delete %1$s Items
+ Delete %1$d Items