Commit 4620e412 authored by Geoffrey Métais's avatar Geoffrey Métais

Limit lists width on large screens

parent c1f98dab
......@@ -3,7 +3,8 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
android:layout_height="fill_parent"
android:background="?attr/background_default_darker" >
<include layout="@layout/tab_layout" />
......@@ -19,9 +20,10 @@
<org.videolan.vlc.gui.view.SwipeRefreshLayout
android:id="@+id/swipeLayout"
android:layout_width="match_parent"
android:layout_width="@dimen/default_content_width"
android:layout_height="match_parent"
android:layout_below="@+id/searchButton">
android:layout_below="@+id/searchButton"
android:layout_centerHorizontal="true" >
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
......
......@@ -2,7 +2,8 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:layout_height="fill_parent"
android:background="?attr/background_default_darker">
<include layout="@layout/tab_layout" />
......@@ -33,9 +34,10 @@
<org.videolan.vlc.gui.view.SwipeRefreshLayout
android:id="@+id/swipeLayout"
android:layout_width="match_parent"
android:layout_width="@dimen/default_content_width"
android:layout_height="match_parent"
android:layout_below="@+id/searchButton">
android:layout_below="@+id/searchButton"
android:layout_centerHorizontal="true">
<android.support.v4.view.ViewPager
android:id="@+id/pager"
......
......@@ -161,7 +161,7 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/songs_list"
android:layout_width="@dimen/playlist_width"
android:layout_width="@dimen/default_content_width"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@+id/header"
app:layout_constraintBottom_toTopOf="@+id/timeline"
......
......@@ -6,4 +6,5 @@
android:clipToPadding="false"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:scrollbars="none" />
\ No newline at end of file
android:scrollbars="none"
android:background="?attr/background_default" />
\ No newline at end of file
......@@ -33,8 +33,7 @@
android:focusable="true"
android:clickable="@{holder != null}"
android:longClickable="@{hasContextMenu || item.getItemType() == MediaLibraryItem.TYPE_STORAGE}"
android:onClick="@{holder::onClick}"
android:background="@drawable/background_item">
android:onClick="@{holder::onClick}">
<org.videolan.vlc.gui.helpers.ThreeStatesCheckbox
android:id="@+id/browser_checkbox"
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="?attr/background_default_darker" >
<include layout="@layout/button_search" />
<include layout="@layout/button_search"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<org.videolan.vlc.gui.view.SwipeRefreshLayout
android:id="@+id/swipeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/searchButton" >
android:layout_width="@dimen/default_content_width"
android:layout_height="0dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/searchButton"
android:background="?attr/background_default" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
......@@ -29,4 +40,4 @@
</org.videolan.vlc.gui.view.SwipeRefreshLayout>
<include layout="@layout/shadow_top"/>
</RelativeLayout>
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="?attr/background_default_darker" >
<org.videolan.vlc.gui.view.SwipeRefreshLayout
android:id="@+id/swipeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="@dimen/default_content_width"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:background="?attr/background_default">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
......
......@@ -13,7 +13,8 @@
xmlns:vlc="http://schemas.android.com/apk/res-auto"
android:id="@+id/coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="?attr/background_default_darker" >
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
......@@ -51,17 +52,22 @@
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<org.videolan.vlc.gui.view.ContextMenuRecyclerView
android:id="@+id/songs"
<FrameLayout
android:id="@+id/container_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:fastScrollEnabled="true"
android:paddingBottom="@dimen/listview_bottom_padding"
android:paddingLeft="10dp"
android:paddingRight="10dp"
vlc:layout_behavior="@string/appbar_scrolling_view_behavior"
style="@style/Theme.VLC.List" />
vlc:layout_behavior="@string/appbar_scrolling_view_behavior">
<org.videolan.vlc.gui.view.ContextMenuRecyclerView
android:id="@+id/songs"
android:layout_width="@dimen/default_content_width"
android:layout_height="match_parent"
android:fastScrollEnabled="true"
android:layout_gravity="center_horizontal"
android:paddingBottom="@dimen/listview_bottom_padding"
android:paddingLeft="10dp"
android:paddingRight="10dp"
style="@style/Theme.VLC.List" />
</FrameLayout>
<android.support.design.widget.FloatingActionButton
vlc:rippleColor="@color/orange50"
......
......@@ -13,9 +13,9 @@
<FrameLayout
android:id="@+id/fragment_placeholder"
android:layout_width="fill_parent"
vlc:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_height="match_parent" />
android:layout_width="match_parent"
android:layout_height="match_parent"
vlc:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.v7.widget.ViewStubCompat
android:id="@+id/scan_viewstub"
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="playlist_width">800dp</dimen>
<dimen name="default_content_width">800dp</dimen>
</resources>
\ No newline at end of file
......@@ -45,7 +45,7 @@
<!-- -1px is fill/match_parent -->
<dimen name="file_picker_height">-1px</dimen>
<dimen name="playlist_width">0dp</dimen>
<dimen name="default_content_width">-1px</dimen>
<!-- Default -->
......
......@@ -131,7 +131,7 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE
mBinding.appbar.setExpanded(false);
ViewCompat.setNestedScrollingEnabled(mBinding.songs, false);
CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams) mBinding.fab.getLayoutParams();
lp.setAnchorId(mBinding.songs.getId());
lp.setAnchorId(R.id.container_list);
lp.anchorGravity = Gravity.BOTTOM|Gravity.RIGHT|Gravity.END;
lp.bottomMargin = getResources().getDimensionPixelSize(R.dimen.default_margin);
lp.setBehavior(new FloatingActionButtonBehavior(PlaylistActivity.this, null));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment