Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/home_result_bottom_gradient.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:type="linear"
android:angle="90"
android:startColor="#00000000"
android:endColor="#CC000000" />
</shape>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/home_result_gradient.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:type="linear"
android:angle="90"
android:startColor="#00000000"
android:endColor="#99000000" />
</shape>
51 changes: 38 additions & 13 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,66 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="?attr/primaryBlackBackground">

<!-- Netflix Style Top Navigation -->
<com.google.android.material.appbarcomponent.AppBarLayout
android:id="@+id/netflix_app_bar"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="?attr/primaryBlackBackground"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:elevation="8dp">

<androidx.appcompat.widget.Toolbar
android:id="@+id/netflix_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBlackBackground">

<TextView
android:id="@+id/app_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ShitFlix"
android:textColor="@color/colorPrimary"
android:textSize="28sp"
android:textStyle="bold"
android:fontFamily="@font/google_sans" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbarcomponent.AppBarLayout>

<com.google.android.material.navigationrail.NavigationRailView
android:id="@+id/nav_rail_view"
android:layout_width="@dimen/nav_rail_view_width"
android:layout_height="match_parent"
android:layout_height="0dp"
android:background="?attr/primaryGrayBackground"
android:descendantFocusability="afterDescendants"
app:itemIconTint="@color/item_select_color"
app:itemTextColor="@color/item_select_color"
app:headerLayout="@layout/rail_header"
app:labelVisibilityMode="unlabeled"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@+id/netflix_app_bar"
app:layout_constraintBottom_toBottomOf="parent"
app:menu="@menu/bottom_nav_menu"
app:menuGravity="center">

<include layout="@layout/rail_footer"/>
<include layout="@layout/rail_footer" />

</com.google.android.material.navigationrail.NavigationRailView>
<!-- android:layout_height="65dp"
app:labelVisibilityMode="unlabeled"

-->
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/nav_view"
android:layout_height="@dimen/nav_view_height"
android:layout_width="0dp"
app:labelVisibilityMode="unlabeled"
android:background="?attr/primaryGrayBackground"

app:itemIconTint="@color/item_select_color"
app:itemTextColor="@color/item_select_color"

app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
Expand All @@ -58,7 +84,7 @@
app:layout_constraintBottom_toTopOf="@+id/cast_mini_controller_holder"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/nav_rail_view"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@+id/netflix_app_bar"
app:navGraph="@navigation/mobile_navigation" />

<LinearLayout
Expand All @@ -69,17 +95,16 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/nav_rail_view"
tools:layout_height="100dp">
<!--com.google.android.gms.cast.framework.media.widget.MiniControllerFragment-->

<fragment
android:id="@+id/cast_mini_controller"
class="com.lagradost.cloudstream3.ui.MyMiniControllerFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"

app:castControlButtons="@array/cast_mini_controller_control_buttons"
app:customCastBackgroundColor="?attr/primaryGrayBackground"
tools:ignore="FragmentTagUsage" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
</FrameLayout>
28 changes: 13 additions & 15 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/home_root"
android:layout_width="match_parent"

android:layout_height="match_parent"
android:background="?attr/primaryBlackBackground"
tools:context=".ui.home.HomeFragment">

<FrameLayout
android:id="@+id/home_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBlackBackground"
android:visibility="gone"
tools:visibility="visible">

Expand Down Expand Up @@ -79,14 +80,11 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/result_padding"
android:layout_marginTop="@dimen/result_padding"

android:layout_marginEnd="@dimen/result_padding"
android:orientation="vertical">

<include layout="@layout/loading_list" />

<include layout="@layout/loading_list" />

<include layout="@layout/loading_list" />
</LinearLayout>
</LinearLayout>
Expand Down Expand Up @@ -150,7 +148,6 @@

<ImageView
android:id="@+id/home_switch_account"

android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_gravity="end"
Expand All @@ -167,16 +164,15 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="?attr/primaryBlackBackground"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="gone">

<com.google.android.material.button.MaterialButton
android:id="@+id/home_reload_connectionerror"
style="@style/WhiteButton"

android:layout_width="wrap_content"

android:layout_gravity="center"
android:layout_margin="5dp"
android:minWidth="200dp"
Expand All @@ -186,9 +182,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/home_reload_connection_open_in_browser"
style="@style/BlackButton"

android:layout_width="wrap_content"

android:layout_gravity="center"
android:layout_margin="5dp"
android:minWidth="200dp"
Expand All @@ -198,9 +192,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/home_reload_connection_go_to_downloads"
style="@style/BlackButton"

android:layout_width="wrap_content"

android:layout_gravity="center"
android:layout_margin="5dp"
android:minWidth="200dp"
Expand All @@ -221,6 +213,7 @@
android:id="@+id/home_master_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/primaryBlackBackground"
android:descendantFocusability="afterDescendants"
android:nextFocusLeft="@id/nav_rail_view"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
Expand All @@ -230,28 +223,33 @@
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/home_api_fab"
style="@style/ExtendedFloatingActionButton"
android:layout_margin="16dp"
android:text="@string/home_source"
android:textColor="?attr/textColor"
android:textColor="@color/white"
android:visibility="gone"
app:backgroundTint="@color/colorPrimary"
app:icon="@drawable/ic_baseline_filter_list_24"
app:iconTint="@color/white"
tools:ignore="ContentDescription"
tools:visibility="visible" />

<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/home_random"
style="@style/ExtendedFloatingActionButton"
android:layout_gravity="bottom|start"
android:layout_margin="16dp"
android:text="@string/home_random"
android:textColor="?attr/textColor"
android:textColor="@color/white"
android:visibility="gone"
app:backgroundTint="@color/colorPrimary"
app:icon="@drawable/ic_baseline_play_arrow_24"
app:iconTint="@color/white"
tools:ignore="ContentDescription"
tools:visibility="visible" />

<!-- Placeholder for TV layout random button - always hidden on phone -->
<ImageView
android:id="@+id/home_random_button_tv"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
</FrameLayout>
</FrameLayout>
82 changes: 82 additions & 0 deletions app/src/main/res/layout/home_result_grid_netflix.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/home_result_card"
android:layout_width="140dp"
android:layout_height="210dp"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
android:foreground="?android:attr/selectableItemBackground">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:id="@+id/home_result_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:contentDescription="@string/poster" />

<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/home_result_gradient" />

<!-- Play Button Overlay -->
<com.google.android.material.button.MaterialButton
android:id="@+id/home_result_play"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:insetLeft="0dp"
android:insetTop="0dp"
android:insetRight="0dp"
android:insetBottom="0dp"
android:padding="0dp"
app:cornerRadius="24dp"
app:icon="@drawable/ic_baseline_play_arrow_24"
app:iconSize="28dp"
app:iconTint="@color/white"
app:backgroundTint="@color/colorPrimary"
app:rippleColor="@color/colorPrimaryDark"
android:visibility="gone"
tools:visibility="visible"
tools:ignore="ContentDescription" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/home_result_bottom_gradient"
android:orientation="vertical"
android:padding="8dp">

<TextView
android:id="@+id/home_result_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="12sp"
android:textStyle="bold"
android:maxLines="2"
android:ellipsize="end"
android:fontFamily="@font/google_sans" />

<RatingBar
android:id="@+id/home_result_rating"
style="@style/RatingBarSmall"
android:layout_width="wrap_content"
android:layout_height="14dp"
android:layout_marginTop="2dp"
android:isIndicator="true"
android:numStars="5"
android:rating="4.5"
android:scaleX="0.7"
android:scaleY="0.7"
android:transformPivotX="0dp" />
</LinearLayout>
</FrameLayout>
</androidx.cardview.widget.CardView>
Loading
Loading