[Android] Audio lists: convert layout to ConstraintLayout
Geoffrey Métais
git at videolan.org
Thu Apr 19 14:13:10 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Apr 19 14:12:49 2018 +0200| [b2fca4e0357a8d578fcbb649e49e3ae7db70ead4] | committer: Geoffrey Métais
Audio lists: convert layout to ConstraintLayout
> https://code.videolan.org/videolan/vlc-android/commit/b2fca4e0357a8d578fcbb649e49e3ae7db70ead4
---
vlc-android/res/layout/audio_browser.xml | 43 +++++++++++++++++++-------------
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/vlc-android/res/layout/audio_browser.xml b/vlc-android/res/layout/audio_browser.xml
index 07ec13948..f3f184231 100644
--- a/vlc-android/res/layout/audio_browser.xml
+++ b/vlc-android/res/layout/audio_browser.xml
@@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout
+<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<include layout="@layout/tab_layout" />
<include layout="@layout/button_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_below="@+id/sliding_tabs"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/sliding_tabs"
android:layout_marginTop="@dimen/default_margin"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
@@ -20,14 +22,18 @@
<org.videolan.vlc.gui.view.SwipeRefreshLayout
android:id="@+id/swipeLayout"
android:layout_width="@dimen/default_content_width"
- android:layout_height="match_parent"
- android:layout_below="@+id/searchButton"
- android:layout_centerHorizontal="true">
+ android:layout_height="0dp"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/searchButton"
+ app:layout_constraintBottom_toBottomOf="parent" >
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ app:layout_constraintTop_toBottomOf="@+id/searchButton"
+ app:layout_constraintBottom_toBottomOf="parent">
<include layout="@layout/audio_recyclerview" />
<include layout="@layout/audio_recyclerview" />
<include layout="@layout/audio_recyclerview" />
@@ -40,8 +46,10 @@
android:id="@+id/no_media"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@+id/header"
- android:layout_centerInParent="true"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/searchButton"
+ app:layout_constraintBottom_toBottomOf="parent"
android:layout_margin="@dimen/default_margin"
android:drawableBottom="@drawable/ic_no_media"
android:drawablePadding="@dimen/default_margin"
@@ -49,17 +57,16 @@
android:maxWidth="600dp"
android:text="@string/nomedia"
android:textSize="20sp"
- android:visibility="gone" />
+ android:visibility="gone"/>
<org.videolan.vlc.gui.view.FastScroller
android:fitsSystemWindows="true"
android:id="@+id/songs_fast_scroller"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
+ android:layout_height="0dp"
android:layout_marginTop="@dimen/default_margin"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
- android:layout_alignTop="@+id/swipeLayout"
- android:layout_alignBottom="@+id/swipeLayout"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="@+id/swipeLayout"
+ app:layout_constraintTop_toTopOf="@+id/swipeLayout"
android:visibility="invisible"/>
-</RelativeLayout>
+</android.support.constraint.ConstraintLayout>
More information about the Android
mailing list