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

how to fix! #40

Open
aliking1400 opened this issue Sep 5, 2022 · 17 comments
Open

how to fix! #40

aliking1400 opened this issue Sep 5, 2022 · 17 comments
Labels
bug Something isn't working

Comments

@aliking1400
Copy link

how to fix background white bottom navigation in page !
fd
fixed

@MehulKK MehulKK added bug Something isn't working and removed bug Something isn't working labels Sep 5, 2022
@MehulKK
Copy link
Contributor

MehulKK commented Sep 5, 2022

@aliking1400 : Can you please provide more details on this.

@MehulKK MehulKK added the more-info-required Provide more information label Sep 5, 2022
@aliking1400
Copy link
Author

My screen is black, but the background color of the navigation button is white, now the background is on transport I do it, but it can't be deleted. How can I delete it?

@ShwetaChauhan18
Copy link
Contributor

@aliking1400 : Got your issue. We will check and let you know ASAP. Thanks for reporting.

@aliking1400
Copy link
Author

Thanks 🙏

@MehulKK
Copy link
Contributor

MehulKK commented Sep 7, 2022

@aliking1400 : We are able to reproduce this issue. As of now we are providing workaround solution to fix this.

For your main FragmentContainerView and SSCustomBottomNavigation , you have to give constraint like below.

<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <!--Below fragment is for NavController Navigation-->
        <androidx.fragment.app.FragmentContainerView
            android:id="@+id/nav_host_fragment"
            android:name="androidx.navigation.fragment.NavHostFragment"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:defaultNavHost="true"
            app:layout_constraintBottom_toBottomOf="parent"   //  <-- This one
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:navGraph="@navigation/mobile_navigation" />

        <!--Below layout is for normal Navigation-->
        <LinearLayout
            android:id="@+id/lnrLayout"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:gravity="center"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            android:orientation="vertical">

            <TextView
                android:id="@+id/tv_selected"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:gravity="center"
                android:textColor="@android:color/black"
                android:textSize="16sp" />

        </LinearLayout>


        // You have to remove top constraint like below in you code
        <com.simform.custombottomnavigation.SSCustomBottomNavigation 
            android:id="@+id/bottomNavigation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:background="@android:color/transparent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:ss_backgroundBottomColor="#ff0000"
            app:ss_backgroundBottomDrawable="@drawable/bottom_drawable"
            app:ss_circleColor="#ff6f00"
            app:ss_countBackgroundColor="#ff6f00"
            app:ss_countTextColor="#ffffff"
            app:ss_countTypeface="fonts/graphik_semibold.ttf"
            app:ss_defaultIconColor="@color/color_black"
            app:ss_iconTextColor="@color/color_black"
            app:ss_iconTextSize="12sp"
            app:ss_iconTextTypeface="fonts/graphik_semibold.ttf"
            app:ss_rippleColor="#2f424242"
            app:ss_selectedIconColor="#ff6f00"
            app:ss_selectedIconTextColor="#ff6f00"
            app:ss_shadowColor="#1f212121"
            app:ss_waveHeight="7" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <data>

    </data>
</layout>

Second thing in your individual fragment view, you have to give Parent layout paddingBottom like below

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/color_chat_bg"
    android:paddingBottom="56dp">.    // <-- You have to add this line 

    <TextView
        android:id="@+id/text_notifications"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="8dp"
        android:text="@string/content_chat"
        android:textAlignment="center"
        android:textColor="@color/color_white"
        android:textSize="20sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

For more information you can refer our sample example.

Till that we are finding proper solutions for this issue.

@ShwetaChauhan18 ShwetaChauhan18 added bug Something isn't working and removed more-info-required Provide more information labels Sep 7, 2022
@aliking1400
Copy link
Author

You misunderstood what I meant

I say that when the background of my page is black, the bottom navigation background is white
I want to remove the background of the bottom navigation
dark

so that it does not have a background on all pages

@ShwetaChauhan18
Copy link
Contributor

ShwetaChauhan18 commented Sep 7, 2022

@aliking1400 : We understood your issue. Just change your constraint as we mention for temporary solution. We are working on proper solution.

Your FragmentContainerView bottom constraint should be at parent instead of top of SSCustomBottomNavigation

@MehulKK
Copy link
Contributor

MehulKK commented Sep 7, 2022

@aliking1400 : We are understand your issue

Screenshot_1662538742

@aliking1400
Copy link
Author

Yes, this is my problem. Thank you for explaining my problem a little more so that I can solve it

@MehulKK
Copy link
Contributor

MehulKK commented Sep 7, 2022

@aliking1400 : check this solution properly we have added comment as well what you have to do for solve your issue.

#40 (comment)

@aliking1400
Copy link
Author

I did not understand exactly if xml Do you want to change it?

@aliking1400
Copy link
Author

I did not understand exactly if xml Do you want to change it?

`

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F5F8F8"
tools:context=".Activity.MainActivity"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

    <fragment
        android:id="@+id/fragmentContainerView"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/bottomNavigation"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:name="androidx.navigation.fragment.NavHostFragment"
        app:defaultNavHost="true"
        />


    <com.simform.custombottomnavigation.SSCustomBottomNavigation
        android:id="@+id/bottomNavigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/fragmentContainerView"
        app:ss_backgroundBottomColor="@color/Button"
        app:ss_circleColor="#ff6f00"
        app:ss_reverseCurve="false"
        app:ss_waveHeight="7"
        app:ss_countBackgroundColor="@color/Button"
        app:ss_countTextColor="#ffffff"
        app:ss_countTypeface="fonts/font.ttf"
        app:ss_defaultIconColor="#6200EE"
        app:ss_iconTextColor="#6200EE"
        app:ss_iconTextTypeface="fonts/font.ttf"
        app:ss_rippleColor="#2f424242"
        app:ss_iconTextSize="14sp"
        app:ss_selectedIconColor="#F44336"
        app:ss_selectedIconTextColor="#F44336"
        app:ss_shadowColor="#1f212121"
        />



</androidx.constraintlayout.widget.ConstraintLayout>
`

Thank you for fixing it

@aliking1400
Copy link
Author

I did not understand exactly if xml Do you want to change it?

` <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="#F5F8F8" tools:context=".Activity.MainActivity" xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">

    <fragment
        android:id="@+id/fragmentContainerView"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/bottomNavigation"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:name="androidx.navigation.fragment.NavHostFragment"
        app:defaultNavHost="true"
        />


    <com.simform.custombottomnavigation.SSCustomBottomNavigation
        android:id="@+id/bottomNavigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/fragmentContainerView"
        app:ss_backgroundBottomColor="@color/Button"
        app:ss_circleColor="#ff6f00"
        app:ss_reverseCurve="false"
        app:ss_waveHeight="7"
        app:ss_countBackgroundColor="@color/Button"
        app:ss_countTextColor="#ffffff"
        app:ss_countTypeface="fonts/font.ttf"
        app:ss_defaultIconColor="#6200EE"
        app:ss_iconTextColor="#6200EE"
        app:ss_iconTextTypeface="fonts/font.ttf"
        app:ss_rippleColor="#2f424242"
        app:ss_iconTextSize="14sp"
        app:ss_selectedIconColor="#F44336"
        app:ss_selectedIconTextColor="#F44336"
        app:ss_shadowColor="#1f212121"
        />



</androidx.constraintlayout.widget.ConstraintLayout>

`
Thank you for fixing it

Thank you for helping me
Everything I did didn't work

@aliking1400
Copy link
Author

Can you fix my code?
I need it very much

@ShwetaChauhan18
Copy link
Contributor

Sure, I will check today and let you know

@aliking1400
Copy link
Author

Waiting...

@MehulKK
Copy link
Contributor

MehulKK commented Sep 13, 2022

@aliking1400 : As of now solution is same which we provide you.

here is same library that has same issue #4 so for that they has applied same solutions for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants