added local accounts to TV layout

This commit is contained in:
LagradOst 2023-08-02 17:31:55 +02:00
parent 87d85429f8
commit 2475088f76
4 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true"
android:drawable="@drawable/outline_card"/> <!-- focused -->
</selector>

View File

@ -36,12 +36,26 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/home_preview_change_api"
style="@style/RegularButtonTV"
android:nextFocusRight="@id/home_switch_account"
android:layout_width="wrap_content"
android:layout_gravity="top|start"
android:layout_marginStart="@dimen/navbar_width"
android:minWidth="150dp"
android:nextFocusLeft="@id/nav_rail_view"
android:nextFocusDown="@id/home_preview_play_btt" />
<ImageView
android:background="?android:attr/selectableItemBackgroundBorderless"
android:nextFocusDown="@id/home_preview_play_btt"
android:nextFocusLeft="@id/home_preview_change_api"
android:id="@+id/home_switch_account"
android:layout_width="50dp"
android:layout_gravity="end"
android:layout_height="wrap_content"
android:contentDescription="@string/account"
android:padding="10dp"
android:src="@drawable/ic_outline_account_circle_24" />
</FrameLayout>
<LinearLayout

View File

@ -10,7 +10,6 @@
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:textStyle="bold"
android:text="@string/switch_account"
android:textSize="20sp"
@ -19,7 +18,28 @@
android:layout_rowWeight="1"
android:layout_height="wrap_content" />
<TextView
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:text="@string/history"
android:textSize="15sp"
android:textColor="?attr/grayTextColor"
android:layout_width="match_parent"
android:layout_rowWeight="1"
android:layout_height="wrap_content" />
<TextView
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:text="@string/error_bookmarks_text"
android:textSize="15sp"
android:textColor="?attr/grayTextColor"
android:layout_width="match_parent"
android:layout_rowWeight="1"
android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView
android:layout_marginTop="10dp"
android:descendantFocusability="afterDescendants"
android:id="@+id/profiles_recyclerview"
android:layout_width="match_parent"

View File

@ -83,6 +83,7 @@
app:cardCornerRadius="@dimen/rounded_image_radius">
<ImageView
android:foreground="@drawable/outline_drawable_forced_round"
android:id="@+id/profile_pic"
android:layout_width="match_parent"
android:layout_height="60dp"