Merge pull request Android TV support #2806

Closes #2806
This commit is contained in:
TobiGr 2020-04-23 22:32:09 +02:00
commit 04ab753b26
37 changed files with 1743 additions and 91 deletions

View file

@ -178,7 +178,6 @@
android:textSize="15sp"
android:textStyle="bold"
android:clickable="true"
android:focusable="true"
tools:ignore="RtlHardcoded"
tools:text="The Video Title LONG very LONG"/>
@ -194,12 +193,12 @@
android:textColor="@android:color/white"
android:textSize="12sp"
android:clickable="true"
android:focusable="true"
tools:text="The Video Artist LONG very LONG very Long"/>
</LinearLayout>
<TextView
<Button
android:id="@+id/qualityTextView"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="2dp"
@ -210,11 +209,13 @@
android:text="720p"
android:textColor="@android:color/white"
android:textStyle="bold"
android:background="?attr/selectableItemBackground"
android:textAllCaps="false"
android:padding="5dp"
tools:ignore="HardcodedText,RtlHardcoded"/>
<TextView
<Button
android:id="@+id/playbackSpeed"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="2dp"
@ -224,7 +225,8 @@
android:minWidth="40dp"
android:textColor="@android:color/white"
android:textStyle="bold"
android:background="?attr/selectableItemBackground"
android:textAllCaps="false"
android:padding="5dp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="1x" />
@ -270,8 +272,9 @@
tools:ignore="RtlHardcoded"
tools:visibility="visible">
<TextView
<Button
android:id="@+id/resizeTextView"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="8dp"
@ -281,11 +284,13 @@
android:minWidth="50dp"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textAllCaps="false"
android:background="?attr/selectableItemBackground"
tools:ignore="HardcodedText,RtlHardcoded"
tools:text="FIT"/>
<TextView
<Button
style="@style/Widget.AppCompat.Button.Borderless"
android:id="@+id/captionTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -300,6 +305,7 @@
android:paddingRight="2dp"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textAllCaps="false"
android:background="?attr/selectableItemBackground"
tools:ignore="RelativeOverlap,RtlHardcoded"
tools:text="English" />
@ -431,7 +437,7 @@
tools:text="1:06:29"/>
<androidx.appcompat.widget.AppCompatSeekBar
<org.schabi.newpipe.views.FocusAwareSeekBar
android:id="@+id/playbackSeekBar"
style="@style/Widget.AppCompat.SeekBar"
android:layout_width="0dp"

View file

@ -10,11 +10,12 @@
android:orientation="horizontal"
android:baselineAligned="false">
<androidx.coordinatorlayout.widget.CoordinatorLayout
<org.schabi.newpipe.views.FocusAwareCoordinator
android:id="@+id/detail_main_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="5"
android:isScrollContainer="true"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.AppBarLayout
@ -22,6 +23,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:touchscreenBlocksFocus="false"
android:fitsSystemWindows="true"
app:elevation="0dp"
app:layout_behavior="com.google.android.material.appbar.FlingBehavior">
@ -246,6 +248,7 @@
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal"
android:focusable="true"
android:padding="6dp">
<de.hdodenhof.circleimageview.CircleImageView
@ -378,6 +381,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:focusable="true"
android:descendantFocusability="afterDescendants"
android:padding="6dp">
<!-- CONTROLS -->
@ -466,6 +471,8 @@
android:layout_marginTop="5dp"
android:orientation="vertical"
android:visibility="gone"
android:focusable="true"
android:descendantFocusability="afterDescendants"
tools:visibility="visible">
<TextView
@ -481,6 +488,7 @@
<TextView
android:id="@+id/detail_description_view"
android:nextFocusUp="@+id/detail_control_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
@ -490,6 +498,7 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="true"
android:textSize="@dimen/video_item_detail_description_text_size"
android:focusable="false"
tools:text="Description Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a ultricies ex. Integer sit amet sodales risus. Duis non mi et urna pretium bibendum." />
<View
@ -526,7 +535,7 @@
</com.google.android.material.tabs.TabLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</org.schabi.newpipe.views.FocusAwareCoordinator>
<FrameLayout
android:id="@+id/relatedStreamsLayout"

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout
<org.schabi.newpipe.views.FocusAwareDrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
@ -24,4 +24,4 @@
<include layout="@layout/drawer_layout"/>
</androidx.drawerlayout.widget.DrawerLayout>
</org.schabi.newpipe.views.FocusAwareDrawerLayout>

View file

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
android:background="?colorPrimary"
android:nextFocusDown="@+id/drawer_header_action_button">
<androidx.constraintlayout.widget.ConstraintLayout
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="wrap_content"
android:background="?colorPrimary"
android:nextFocusDown="@+id/drawer_header_action_button">
<ImageView
android:layout_width="match_parent"

View file

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.navigation.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="?android:attr/windowBackground"
android:orientation="vertical"
app:headerLayout="@layout/drawer_header" />
<com.google.android.material.navigation.NavigationView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="?android:attr/windowBackground"
android:orientation="vertical"
app:headerLayout="@layout/drawer_header" />

View file

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
<org.schabi.newpipe.views.NewPipeRecyclerView
android:id="@+id/items_list"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
<org.schabi.newpipe.views.NewPipeRecyclerView
android:id="@+id/items_list"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -12,6 +12,7 @@
android:layout_marginTop="3dp"
android:minHeight="?listPreferredItemHeightSmall"
android:orientation="horizontal"
android:focusable="true"
app:cardCornerRadius="5dp"
app:cardElevation="4dp">

View file

@ -18,6 +18,7 @@
android:layout_alignParentTop="true"
android:layout_marginRight="@dimen/video_item_search_image_right_margin"
android:contentDescription="@string/list_thumbnail_view_description"
android:focusable="false"
android:src="@drawable/buddy"
tools:ignore="RtlHardcoded" />

View file

@ -17,6 +17,7 @@
android:background="?attr/colorPrimary"
android:focusable="true"
android:focusableInTouchMode="true"
android:nextFocusDown="@+id/suggestions_list"
android:hint="@string/search"
android:imeOptions="actionSearch|flagNoFullscreen"
android:inputType="textFilter|textNoSuggestions"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB