Open cheonjoosung opened 2 years ago
Hello. Now i found bug SlidingUpPanel with BottomNavigation.
The problem is fragment layout don't show when app started. Change the tab and it will be visible So I have to do this every time you launch the app.
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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">
<!-- Notice the attribute layout above --> <com.sothree.slidinguppanel.SlidingUpPanelLayout android:id="@+id/main_frame" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/nav_view" android:background="@color/teal_200" android:gravity="bottom" app:umanoPanelHeight="70dp" app:umanoShadowHeight="5dp" tools:context=".MainActivity"> <!-- Fragment container here --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/back_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#42A5F5"> <fragment android:id="@+id/nav_host_fragment_activity_main" android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="0dp" android:layout_height="0dp" app:defaultNavHost="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" app:navGraph="@navigation/mobile_navigation" /> </androidx.constraintlayout.widget.ConstraintLayout> <!-- Mini Player here --> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/slide_layout" android:visibility="gone" android:background="@color/white" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/frame_layout" android:layout_width="match_parent" android:layout_height="match_parent" /> </androidx.constraintlayout.widget.ConstraintLayout> </com.sothree.slidinguppanel.SlidingUpPanelLayout> <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/nav_view" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:layout_alignParentBottom="true" android:background="?android:attr/windowBackground" app:menu="@menu/bottom_nav_menu" />
Library Guide need root element. But my code root element is RelativeLayout because of Bottom Nav.
If the guide is mandatory, is there a solution?
Hello. Now i found bug SlidingUpPanel with BottomNavigation.
The problem is fragment layout don't show when app started. Change the tab and it will be visible So I have to do this every time you launch the app.
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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">
Library Guide need root element. But my code root element is RelativeLayout because of Bottom Nav.
If the guide is mandatory, is there a solution?