AquaStream/app/src/main/res/layout/fragment_home.xml

356 lines
17 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/home_root"
tools:context=".ui.home.HomeFragment">
<FrameLayout
android:visibility="gone"
tools:visibility="gone"
android:id="@+id/home_loading"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:layout_gravity="center"
android:visibility="visible"
tools:visibility="visible"
android:layout_width="50dp"
android:layout_height="50dp">
</ProgressBar>
<FrameLayout
android:id="@+id/home_loading_statusbar"
android:layout_width="match_parent"
android:layout_height="60dp">
<ImageView
android:id="@+id/home_change_api_loading"
android:layout_margin="10dp"
android:layout_gravity="center_vertical|end"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_outline_settings_24"
android:layout_width="25dp"
android:layout_height="25dp"
android:contentDescription="@string/home_change_provider_img_des">
</ImageView>
</FrameLayout>
</FrameLayout>
<LinearLayout
android:visibility="gone"
tools:visibility="gone"
android:id="@+id/home_loading_error"
android:orientation="vertical"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:layout_gravity="center"
style="@style/WhiteButton"
android:layout_margin="5dp"
app:icon="@drawable/ic_baseline_autorenew_24"
android:text="@string/reload_error"
android:id="@+id/home_reload_connectionerror"
android:layout_width="wrap_content"
android:minWidth="200dp"
/>
<com.google.android.material.button.MaterialButton
android:layout_gravity="center"
style="@style/BlackButton"
android:layout_margin="5dp"
app:icon="@drawable/ic_baseline_public_24"
android:text="@string/result_open_in_browser"
android:id="@+id/home_reload_connection_open_in_browser"
android:layout_width="wrap_content"
android:minWidth="200dp"
/>
<TextView
android:layout_margin="5dp"
android:gravity="center"
android:layout_gravity="center"
android:id="@+id/result_error_text"
android:textColor="?attr/textColor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:background="?attr/primaryBlackBackground"
tools:visibility="visible"
android:visibility="gone"
android:id="@+id/home_loaded"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:background="?attr/darkBackground"
android:id="@+id/home_statusbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
<FrameLayout
android:id="@+id/home_settings_bar"
android:background="?attr/darkBackground"
android:layout_width="match_parent"
android:layout_height="70dp">
<LinearLayout
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_marginEnd="50dp"
android:layout_height="match_parent">
<TextView
android:gravity="center_vertical"
android:layout_gravity="center"
android:id="@+id/home_provider_name"
android:textColor="?attr/textColor"
android:textSize="20sp"
tools:text="Hello World"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</TextView>
<TextView
android:gravity="center_vertical"
android:layout_gravity="center"
android:id="@+id/home_provider_meta_info"
android:textColor="?attr/grayTextColor"
android:textSize="14sp"
tools:text="Hello World"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</TextView>
</LinearLayout>
<ImageView
android:nextFocusDown="@id/home_main_poster_recyclerview"
android:id="@+id/home_change_api"
android:layout_margin="10dp"
android:layout_gravity="center|end"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_outline_settings_24"
android:layout_width="25dp"
android:layout_height="25dp"
android:contentDescription="@string/home_change_provider_img_des">
<requestFocus/>
</ImageView>
</FrameLayout>
<LinearLayout
android:layout_marginTop="10dp"
android:id="@+id/home_main_holder"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:descendantFocusability="afterDescendants"
android:nextFocusUp="@id/home_change_api"
android:nextFocusDown="@id/home_main_info"
android:clipToPadding="false"
android:paddingStart="148dp"
android:paddingEnd="148dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:id="@+id/home_main_poster_recyclerview"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:listitem="@layout/home_result_grid"
/>
<!--<ImageView
android:foreground="@drawable/outline_drawable"
android:id="@+id/home_main_poster"
tools:src="@drawable/example_poster"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:layout_width="150dp"
android:layout_height="212dp"
android:contentDescription="@string/home_main_poster_img_des">
</ImageView>-->
<TextView
android:id="@+id/home_main_text"
android:layout_gravity="center"
android:gravity="center"
tools:text="Perfect Run"
android:textStyle="bold"
android:layout_margin="5dp"
android:textSize="15sp"
android:textColor="@color/textColor"
android:layout_width="match_parent"
android:maxLines="2"
android:ellipsize="end"
android:layout_height="40sp"/>
<LinearLayout
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:nextFocusLeft="@id/home_main_info"
android:nextFocusUp="@id/home_main_poster_recyclerview"
android:nextFocusRight="@id/home_main_info"
android:nextFocusDown="@id/home_watch_child_more_info"
style="@style/WhiteButton"
android:visibility="visible"
android:layout_gravity="center"
android:id="@+id/home_main_play"
android:text="@string/home_play"
app:icon="@drawable/ic_baseline_play_arrow_24"
android:minWidth="120dp"
android:layout_width="wrap_content">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:nextFocusLeft="@id/home_main_play"
android:nextFocusUp="@id/home_main_poster_recyclerview"
android:nextFocusRight="@id/home_main_play"
android:nextFocusDown="@id/home_watch_child_more_info"
style="@style/BlackButton"
android:visibility="visible"
android:layout_gravity="center"
android:text="@string/home_info"
app:icon="@drawable/ic_outline_info_24"
android:id="@+id/home_main_info"
android:clickable="true"
android:focusable="true"
android:minWidth="120dp"
android:layout_width="wrap_content">
</com.google.android.material.button.MaterialButton>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/home_watch_holder"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:nextFocusUp="@id/home_main_info"
android:nextFocusDown="@id/home_watch_child_recyclerview"
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:id="@+id/home_watch_child_more_info"
android:padding="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_gravity="center_vertical"
android:id="@+id/home_watch_parent_item_title"
style="@style/WatchHeaderText"
android:text="@string/continue_watching"
/>
<ImageView
android:layout_marginEnd="5dp"
android:layout_gravity="end|center_vertical"
android:src="@drawable/ic_baseline_arrow_forward_24"
android:layout_width="30dp"
android:layout_height="match_parent"
android:contentDescription="@string/home_more_info">
</ImageView>
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:descendantFocusability="afterDescendants"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:id="@+id/home_watch_child_recyclerview"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:listitem="@layout/home_result_grid"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/home_bookmarked_holder"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:nextFocusUp="@id/home_watch_child_recyclerview"
android:nextFocusForward="@id/home_bookmarked_child_recyclerview"
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:id="@+id/home_bookmarked_child_more_info"
android:padding="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:background="?android:attr/selectableItemBackgroundBorderless"
android:id="@+id/home_bookmark_select"
android:src="@drawable/ic_baseline_filter_list_24"
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@string/filter_bookmarks">
</ImageView>
<TextView
android:layout_gravity="center_vertical"
android:layout_marginStart="40dp"
android:id="@+id/home_bookmarked_parent_item_title"
style="@style/WatchHeaderText"
tools:text="Bookmarked"
/>
<ImageView
android:layout_marginEnd="5dp"
android:layout_gravity="end|center_vertical"
android:src="@drawable/ic_baseline_arrow_forward_24"
android:layout_width="30dp"
android:layout_height="match_parent"
android:contentDescription="@string/home_more_info">
</ImageView>
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:descendantFocusability="afterDescendants"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:id="@+id/home_bookmarked_child_recyclerview"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:listitem="@layout/home_result_grid"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:descendantFocusability="afterDescendants"
android:id="@+id/home_master_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/homepage_parent"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</FrameLayout>