Better TV support, icons, activity_main refactoring
- on Android TV you'll be able to navigate with D-pad in main fragment and in the player. But not between them for now - play/pause/next/previous buttons are smaller now - replaced ic_list with previous version of it - activity_main looks better which helps with Android TV support
This commit is contained in:
parent
77cd3182f1
commit
3ecbbea7cb
10 changed files with 53 additions and 74 deletions
|
|
@ -1,19 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.schabi.newpipe.views.FocusAwareDrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
<org.schabi.newpipe.views.FocusAwareCoordinator
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context="org.schabi.newpipe.MainActivity">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -21,24 +18,18 @@
|
|||
android:layout_marginTop="?attr/actionBarSize" />
|
||||
|
||||
<include layout="@layout/toolbar_layout" />
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment_player_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:layout_behavior="org.schabi.newpipe.player.event.CustomBottomSheetBehavior">
|
||||
android:id="@+id/fragment_player_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:layout_behavior="org.schabi.newpipe.player.event.CustomBottomSheetBehavior">
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</org.schabi.newpipe.views.FocusAwareCoordinator>
|
||||
|
||||
<include layout="@layout/drawer_layout"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -250,9 +250,12 @@
|
|||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/queueButton"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:padding="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingStart="3dp"
|
||||
android:paddingEnd="3dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
|
|
@ -478,14 +481,13 @@
|
|||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="5.5">
|
||||
<!--tools:visibility="gone">-->
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playPreviousButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
|
|
@ -497,7 +499,7 @@
|
|||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playPauseButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
|
|
@ -507,9 +509,9 @@
|
|||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playNextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
|
|
|
|||
|
|
@ -186,8 +186,8 @@
|
|||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/control_backward"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_toLeftOf="@+id/control_fast_rewind"
|
||||
|
|
@ -265,8 +265,8 @@
|
|||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/control_forward"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_toRightOf="@+id/control_fast_forward"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue