2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-09 19:10:42 +00:00

For #2133 - Add destructive text color to delete history button

This commit is contained in:
Emily Kager 2019-05-28 14:10:46 -07:00 committed by Sawyer Blatz
parent 506f332b85
commit bfc0fa36b1
2 changed files with 18 additions and 28 deletions

View File

@ -17,7 +17,6 @@ class HistoryDeleteButtonViewHolder(
private val actionEmitter: Observer<HistoryAction> private val actionEmitter: Observer<HistoryAction>
) : RecyclerView.ViewHolder(view) { ) : RecyclerView.ViewHolder(view) {
private var mode: HistoryState.Mode? = null private var mode: HistoryState.Mode? = null
private val textView = view.delete_history_button_text
private val buttonView = view.delete_history_button private val buttonView = view.delete_history_button
init { init {

View File

@ -2,32 +2,23 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this - License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<FrameLayout <com.google.android.material.button.MaterialButton xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/delete_history_button" android:id="@+id/delete_history_button"
android:foreground="?android:attr/selectableItemBackground" style="@style/Widget.MaterialComponents.Button.TextButton"
android:background="@drawable/button_background"
android:layout_margin="16dp"
android:padding="6dp"
android:clickable="true"
android:focusable="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_margin="16dp"
<TextView android:background="@drawable/button_background"
android:id="@+id/delete_history_button_text" android:letterSpacing="0"
android:layout_width="wrap_content" android:text="@string/history_delete_all"
android:layout_height="wrap_content" android:textAllCaps="false"
android:layout_gravity="center" android:textColor="?destructive"
android:text="@string/history_delete_all" android:textStyle="bold"
android:gravity="center" android:theme="@style/Theme.MaterialComponents.Light"
android:textColor="?primaryText" app:backgroundTint="?neutral"
android:textSize="16sp" app:icon="@drawable/ic_delete"
android:textStyle="bold" app:iconGravity="textStart"
android:clickable="false" app:iconPadding="8dp"
android:focusable="false" app:iconTint="?destructive"
android:drawableTint="?primaryText" app:rippleColor="?secondaryText" />
android:drawableStart="@drawable/ic_delete"
android:drawablePadding="12dp"/>
</FrameLayout>