[Android] NavigationRailView to the whole screen height

Dmitry git at videolan.org
Mon Feb 20 10:30:01 UTC 2023


vlc-android | branch: master | Dmitry <dgyudin at gmail.com> | Fri Feb 17 00:40:05 2023 +0100| [e6bed3f53f36ac9db81c6498b01e026bbf9c838c] | committer: Nicolas Pomepuy

NavigationRailView to the whole screen height

> https://code.videolan.org/videolan/vlc-android/commit/e6bed3f53f36ac9db81c6498b01e026bbf9c838c
---

 application/vlc-android/res/layout/main.xml | 133 ++++++++++++++--------------
 1 file changed, 66 insertions(+), 67 deletions(-)

diff --git a/application/vlc-android/res/layout/main.xml b/application/vlc-android/res/layout/main.xml
index 26a4b2eb13..b9e457f11b 100644
--- a/application/vlc-android/res/layout/main.xml
+++ b/application/vlc-android/res/layout/main.xml
@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/coordinator"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
+<LinearLayout 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="match_parent">
 
     <com.google.android.material.navigationrail.NavigationRailView
             android:id="@+id/navigation_rail"
@@ -17,73 +15,74 @@
             app:layout_behavior="@string/appbar_scrolling_view_behavior"
             app:menu="@menu/bottom_navigation" />
 
-    <include
-            layout="@layout/toolbar"
-            android:nextFocusLeft="@+id/ml_menu_search"
-            android:nextFocusRight="@+id/ml_menu_search"
-            android:nextFocusUp="@+id/ml_menu_search"
-            android:nextFocusDown="@+id/ml_menu_search"
-            android:nextFocusForward="@+id/ml_menu_search" />
-
-    <androidx.fragment.app.FragmentContainerView
-            android:id="@+id/fragment_placeholder"
+    <androidx.coordinatorlayout.widget.CoordinatorLayout
+            android:id="@+id/coordinator"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_marginStart="@dimen/navigation_margin"
-            android:keyboardNavigationCluster="true"
-            app:layout_behavior="@string/appbar_scrolling_view_behavior"
-            tools:targetApi="o" />
+            android:layout_height="match_parent">
 
-    <androidx.appcompat.widget.ViewStubCompat
-            android:id="@+id/scan_viewstub"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            app:layout_anchor="@+id/navigation"
-            app:layout_anchorGravity="top"
-            android:layout_gravity="top"
-            android:layout="@layout/scan_progress" />
+        <include
+                layout="@layout/toolbar"
+                android:nextFocusLeft="@+id/ml_menu_search"
+                android:nextFocusRight="@+id/ml_menu_search"
+                android:nextFocusUp="@+id/ml_menu_search"
+                android:nextFocusDown="@+id/ml_menu_search"
+                android:nextFocusForward="@+id/ml_menu_search" />
 
-    <include layout="@layout/audioplayercontainer" />
+        <androidx.fragment.app.FragmentContainerView
+                android:id="@+id/fragment_placeholder"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/navigation_margin"
+                android:keyboardNavigationCluster="true"
+                app:layout_behavior="@string/appbar_scrolling_view_behavior"
+                tools:layout="@layout/about_authors_activity"
+                tools:targetApi="o" />
 
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-            android:id="@+id/fab"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="@dimen/default_margin"
-            app:useCompatPadding="true"
-            app:layout_dodgeInsetEdges="bottom"
-            app:srcCompat="@drawable/ic_fab_add"
-            android:tint="@color/grey50"
-            android:visibility="invisible"
-            app:borderWidth="0dp"
-            app:layout_anchor="@+id/navigation"
-            app:layout_anchorGravity="top|end"
-            android:layout_gravity="top|end"
-            app:layout_behavior="org.videolan.vlc.gui.helpers.FloatingActionButtonBehavior"
-            app:rippleColor="@color/orange50" />
+        <androidx.appcompat.widget.ViewStubCompat
+                android:id="@+id/scan_viewstub"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                app:layout_anchor="@+id/navigation"
+                app:layout_anchorGravity="top"
+                android:layout_gravity="top"
+                android:layout="@layout/scan_progress" />
 
-    <com.google.android.material.bottomnavigation.BottomNavigationView
-            android:id="@+id/navigation"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="bottom"
-            android:background="?attr/bottom_navigation_background"
-            app:elevation="16dp"
-            app:itemIconTint="@color/bottom_navigation_selector"
-            app:itemRippleColor="?attr/bottom_navigation_focus"
-            app:itemTextColor="@color/bottom_navigation_selector"
-            app:labelVisibilityMode="labeled"
-            app:layout_behavior="org.videolan.vlc.gui.helpers.BottomNavigationBehavior"
-            app:layout_insetEdge="bottom"
-            app:menu="@menu/bottom_navigation" />
+        <include layout="@layout/audioplayercontainer"/>
 
+        <com.google.android.material.floatingactionbutton.FloatingActionButton
+                android:id="@+id/fab"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="@dimen/default_margin"
+                app:useCompatPadding="true"
+                app:layout_dodgeInsetEdges="bottom"
+                app:srcCompat="@drawable/ic_fab_add"
+                android:tint="@color/grey50"
+                android:visibility="invisible"
+                app:borderWidth="0dp"
+                app:layout_anchor="@+id/navigation"
+                app:layout_anchorGravity="top|end"
+                android:layout_gravity="top|end"
+                app:layout_behavior="org.videolan.vlc.gui.helpers.FloatingActionButtonBehavior" />
 
-    <androidx.appcompat.widget.ViewStubCompat
-            android:id="@+id/audio_player_tips"
-            android:layout="@layout/audio_player_tips"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent" />
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
+        <com.google.android.material.bottomnavigation.BottomNavigationView
+                android:id="@+id/navigation"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="bottom"
+                app:elevation="16dp"
+                app:itemRippleColor="?attr/bottom_navigation_focus"
+                app:labelVisibilityMode="labeled"
+                app:layout_behavior="org.videolan.vlc.gui.helpers.BottomNavigationBehavior"
+                app:layout_insetEdge="bottom"
+                app:menu="@menu/bottom_navigation" />
 
 
+        <androidx.appcompat.widget.ViewStubCompat
+                android:id="@+id/audio_player_tips"
+                android:layout="@layout/audio_player_tips"
+                android:layout_height="match_parent"
+                android:layout_width="match_parent"/>
+    </androidx.coordinatorlayout.widget.CoordinatorLayout>
 
+</LinearLayout>
\ No newline at end of file



More information about the Android mailing list