diff options
Diffstat (limited to 'ui/src/main/res/layout')
-rw-r--r-- | ui/src/main/res/layout/tv_activity.xml | 25 | ||||
-rw-r--r-- | ui/src/main/res/layout/tv_tunnel_list_item.xml | 14 |
2 files changed, 21 insertions, 18 deletions
diff --git a/ui/src/main/res/layout/tv_activity.xml b/ui/src/main/res/layout/tv_activity.xml index 43470bfc..1a45769f 100644 --- a/ui/src/main/res/layout/tv_activity.xml +++ b/ui/src/main/res/layout/tv_activity.xml @@ -29,35 +29,36 @@ <!-- TODO: Make into a neat square above the selection squares --> <ImageView android:id="@+id/banner_logo" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/tv_logo_banner" + android:layout_width="240dp" + android:layout_height="50dp" + android:contentDescription="@string/app_name" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:srcCompat="@drawable/tv_logo_banner" /> <androidx.recyclerview.widget.RecyclerView android:id="@+id/tunnel_list" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="0dp" android:layout_marginTop="16dp" android:orientation="horizontal" app:configurationHandler="@{rowConfigurationHandler}" app:items="@{tunnels}" app:layout="@{@layout/tv_tunnel_list_item}" - app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" app:layout_constraintBottom_toTopOf="@id/import_button" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" + app:layout_constraintTop_toBottomOf="@id/banner_logo" tools:itemCount="10" tools:listitem="@layout/tv_tunnel_list_item" /> <com.google.android.material.button.MaterialButton android:id="@+id/import_button" - style="?attr/textAppearanceButton" + style="@style/Widget.MaterialComponents.Button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="16dp" android:text="@string/create_from_file" + android:textColor="?attr/colorOnPrimary" android:visibility="@{isDeleting ? View.GONE : View.VISIBLE}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> @@ -65,16 +66,16 @@ <!-- 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="@style/Widget.MaterialComponents.Button.Icon" + style="@style/Widget.MaterialComponents.Button" 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}" - app:icon="@{isDeleting ? @drawable/ic_action_generate : @drawable/ic_action_delete}" + app:icon="@{isDeleting ? @drawable/ic_arrow_back : @drawable/ic_action_delete}" app:iconPadding="0dp" + app:iconTint="?attr/colorOnPrimary" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" /> - </androidx.constraintlayout.widget.ConstraintLayout> -</layout>
\ No newline at end of file +</layout> diff --git a/ui/src/main/res/layout/tv_tunnel_list_item.xml b/ui/src/main/res/layout/tv_tunnel_list_item.xml index c5dd6c37..00edabc5 100644 --- a/ui/src/main/res/layout/tv_tunnel_list_item.xml +++ b/ui/src/main/res/layout/tv_tunnel_list_item.xml @@ -28,12 +28,10 @@ <com.google.android.material.card.MaterialCardView android:layout_width="300dp" android:layout_height="150dp" - android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - android:backgroundTint="@{isDeleting ? @color/error_tag_color : item.state == State.UP ? @color/secondary_light_color : @color/primary_color}" + android:layout_margin="8dp" + android:backgroundTint="@{isDeleting ? @color/error_tag_color : item.state == State.UP ? @color/secondary_dark_color : @color/tv_card_background}" android:checkable="true" - android:focusable="true" - app:cardCornerRadius="12dp"> + android:focusable="true"> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" @@ -42,15 +40,18 @@ <com.google.android.material.textview.MaterialTextView android:id="@+id/tunnel_name" + style="@style/TextAppearance.MaterialComponents.Headline4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{item.name}" + android:textColor="?attr/colorOnPrimary" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" tools:text="@sample/interface_names.json/names/names/name" /> <com.google.android.material.textview.MaterialTextView android:id="@+id/tunnel_transfer" + style="@style/TextAppearance.MaterialComponents.Body1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="@{isDeleting ? View.GONE : View.VISIBLE}" @@ -66,7 +67,8 @@ android:text="@string/tv_delete" android:visibility="@{isDeleting && true ? View.VISIBLE : View.GONE}" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintStart_toStartOf="parent" + tools:visibility="gone" /> </androidx.constraintlayout.widget.ConstraintLayout> |