tv: use proper icon for button
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
d56f2fb1bb
commit
309571039d
@ -4,6 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<import type="android.view.View" />
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<import type="com.wireguard.android.model.ObservableTunnel" />
|
<import type="com.wireguard.android.model.ObservableTunnel" />
|
||||||
@ -52,15 +53,17 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
<!-- TODO: Text should probably be a drawable, right? -->
|
<!-- TODO: ic_action_generate is wrong. this should instead be a "return"/"back" icon -->
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/delete_button"
|
android:id="@+id/delete_button"
|
||||||
style="?attr/textAppearanceButton"
|
style="@style/Widget.MaterialComponents.Button.Icon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
|
android:minWidth="0dp"
|
||||||
android:visibility="@{tunnels.isEmpty && !isDeleting ? View.GONE : View.VISIBLE}"
|
android:visibility="@{tunnels.isEmpty && !isDeleting ? View.GONE : View.VISIBLE}"
|
||||||
android:text="@{isDeleting ? "⏎" : "🗑"}"
|
app:icon="@{isDeleting ? @drawable/ic_action_generate : @drawable/ic_action_delete}"
|
||||||
|
app:iconPadding="0dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user