Added NavigationRailView for Landscape

This commit is contained in:
Prathamesh More 2022-06-05 23:48:37 +05:30
parent 7efbbc3f11
commit d2a7588861
11 changed files with 100 additions and 34 deletions

View file

@ -0,0 +1,58 @@
<?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/mainContent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.navigationrail.NavigationRailView
android:id="@+id/navigationView"
style="@style/Widget.Material3.NavigationRailView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:itemHorizontalTranslationEnabled="false"
app:menu="@menu/bottom_navigation_main"
tools:viewBindingType="com.google.android.material.navigation.NavigationBarView" />
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_container"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
app:defaultNavHost="true"
app:layout_constraintTop_toTopOf="parent"
tools:layout="@layout/fragment_home" />
</LinearLayout>
<FrameLayout
android:id="@+id/slidingPanel"
style="@style/BottomSheetStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:behavior_hideable="true"
app:behavior_peekHeight="@dimen/mini_player_height"
app:enableEdgeToEdge="true"
app:gestureInsetBottomIgnored="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
tools:visibility="visible">
<FrameLayout
android:id="@+id/playerFragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<fragment
android:id="@+id/miniPlayerFragment"
android:name="code.name.monkey.retromusic.fragments.other.MiniPlayerFragment"
android:layout_width="match_parent"
android:layout_height="@dimen/mini_player_height"
tools:layout="@layout/fragment_mini_player" />
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -43,14 +43,13 @@
</FrameLayout>
<code.name.monkey.retromusic.views.BottomNavigationBarTinted
android:id="@+id/bottomNavigationView"
android:id="@+id/navigationView"
style="@style/Widget.Material3.BottomNavigationView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:minHeight="@dimen/bottom_nav_height"
app:itemHorizontalTranslationEnabled="false"
app:itemPaddingBottom="8dp"
app:itemPaddingTop="8dp"
app:menu="@menu/bottom_navigation_main" />
app:menu="@menu/bottom_navigation_main"
tools:viewBindingType="com.google.android.material.navigation.NavigationBarView"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -12,8 +12,8 @@
<dimen name="list_item_image_icon_padding">8dp</dimen>
<dimen name="mini_player_height">56dp</dimen>
<dimen name="bottom_nav_height">72dp</dimen>
<dimen name="bottom_nav_mini_player_height">128dp</dimen>
<dimen name="bottom_nav_height">80dp</dimen>
<dimen name="bottom_nav_mini_player_height">136dp</dimen>
<dimen name="app_widget_classic_height">96dp</dimen>
<dimen name="app_widget_classic_image_size">96dp</dimen>