diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-09-22 16:44:43 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-09-22 23:53:49 +0200 |
commit | 309571039d5272a2a3d191897654856c4bcd405e (patch) | |
tree | 20084ad0d6d046742c61d7876e461fd61c000cfc /ui/src/main/res/layout | |
parent | d56f2fb1bbb762a7c0148d89cfa44e369a839fe6 (diff) |
tv: use proper icon for button
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/res/layout')
-rw-r--r-- | ui/src/main/res/layout/tv_activity.xml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/src/main/res/layout/tv_activity.xml b/ui/src/main/res/layout/tv_activity.xml index b1e240c3..50afda34 100644 --- a/ui/src/main/res/layout/tv_activity.xml +++ b/ui/src/main/res/layout/tv_activity.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools"> <data> + <import type="android.view.View" /> <import type="com.wireguard.android.model.ObservableTunnel" /> @@ -52,15 +53,17 @@ app:layout_constraintBottom_toBottomOf="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 android:id="@+id/delete_button" - style="?attr/textAppearanceButton" + style="@style/Widget.MaterialComponents.Button.Icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="16dp" + android:minWidth="0dp" 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_constraintStart_toStartOf="parent" /> |