Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SlidingUpPanel with BottomNavigation Help .... #993

Open
cheonjoosung opened this issue May 10, 2022 · 0 comments
Open

SlidingUpPanel with BottomNavigation Help .... #993

cheonjoosung opened this issue May 10, 2022 · 0 comments

Comments

@cheonjoosung
Copy link

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.

<!-- 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant