Giter Site home page Giter Site logo

curved-bottom-navigation's People

Contributors

fiote avatar susonthapa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

curved-bottom-navigation's Issues

Not resizing bottom nav bar when i change to landscape

When i implemented initially, it works fine , but after designing each page and check the App with landscape . The bottom nav menu get collapsed. still now the width of the bottom bar as on Patriate View and also the current fragment highlighting menu also have problem.
Screenshot_20221115_191429
Screenshot_20221115_191540

crash sometime happened

.UnsupportedOperationException: Sorting went bad, the start event should always be at index 0

ClassCastException while passing menuItems to setMenuItems() method

Throwing below exception with message:
Unable to start activity ComponentInfo{com.arika/com.arika.TestActivity}: java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable cannot be cast to android.graphics.drawable.AnimatedVectorDrawable

it is not casting properly for animatedDrawables.

Forbidden! When accessing bintray release

Could not GET 'https://dl.bintray.com/susonthapa/curved-bottom-navigation/np/com/susanthapa/curved_bottom_navigation/latest_version/curved_bottom_navigation-latest_version.pom'. Received status code 403 from server: Forbidden
Disable Gradle 'offline mode' and sync project

https://dl.bintray.com/susonthapa/curved-bottom-navigation

The above URL is also Forbidden

After solving above suddenly this appear

Could not GET 'https://dl.bintray.com/susonthapa/curved-bottom-navigation/android/arch/persistence/room/rxjava2/2.3.0-beta03/rxjava2-2.3.0-beta03.pom'. Received status code 403 from server: Forbidden
Disable Gradle 'offline mode' and sync project

CurvedBottomNavigationView Background Issue

The problem is the CurvedBottomNavigationView has a background attach to it which shows the gap between the layout constrained above it. I read and solved the issue like you suggested here. But I would like to make the background transparent somehow where when the layout scrolls you can see the contents behind it being scrolled.

This is activity_main

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

    </data>

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <include
            android:id="@+id/toolbarLayout"
            layout="@layout/layout_toolbar" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">

            <androidx.fragment.app.FragmentContainerView
                android:id="@+id/fcv_navHost"
                android:name="androidx.navigation.fragment.NavHostFragment"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:background="@color/black" // setting it to black so the difference can be noticed
                android:clipToPadding="false"
                android:paddingBottom="56dp"
                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/nav_graph" />

            <np.com.susanthapa.curved_bottom_navigation.CurvedBottomNavigationView
                android:id="@+id/bottomNavigationView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@android:color/transparent" // something like could be added?
                app:cbn_bg="@color/primary"
                app:cbn_fabBg="@color/primary"
                app:cbn_selectedColor="@color/white"
                app:cbn_unSelectedColor="@color/white"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:menu="@menu/bottom_navigation" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

</layout>

I am trying to achieve something like this where the button can be seen scrolling from the gap of Selected FAB.
Screenshot 2023-10-31 at 11 33 20 AM

Any chance for a Public License

I've used this repository as base for an application I'm developing. To turn it more flexible, I need extend its functionalities a bit. As I see, the repo has no license as per use information. So can you grant permission for modifying the base code e distribution?

Unable to start activity ComponentInfo{com.ccninfotech.cybervpnpro/com.ccninfotech.cybervpnpro.ui.MainActivity}: java.lang.UnsupportedOperationException: Sorting went bad, the start event should always be at index 0

Caused by java.lang.UnsupportedOperationException: Sorting went bad, the start event should always be at index 0
at android.animation.AnimatorSet.sortAnimationEvents(AnimatorSet.java:1638)
at android.animation.AnimatorSet.createDependencyGraph(AnimatorSet.java:1534)
at android.animation.AnimatorSet.initAnimation(AnimatorSet.java:700)
at android.animation.AnimatorSet.start(AnimatorSet.java:719)
at android.animation.AnimatorSet.start(AnimatorSet.java:684)
at np.com.susanthapa.curved_bottom_navigation.BottomNavItemView.startIntermediateAnimation(BottomNavItemView.kt:58)
at np.com.susanthapa.curved_bottom_navigation.CurvedBottomNavigationView.getBezierCurveAnimation$lambda-11$lambda-10(CurvedBottomNavigationView.java:609)
at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1653)
at android.animation.ValueAnimator.setCurrentFraction(ValueAnimator.java:775)
at android.animation.ValueAnimator.setCurrentPlayTime(ValueAnimator.java:738)
at android.animation.ValueAnimator.start(ValueAnimator.java:1170)
at android.animation.ValueAnimator.start(ValueAnimator.java:1189)
at android.animation.ValueAnimator.startWithoutPulsing(ValueAnimator.java:1182)
at android.animation.AnimatorSet.handleAnimationEvents(AnimatorSet.java:1149)
at android.animation.AnimatorSet.startAnimation(AnimatorSet.java:1234)
at android.animation.AnimatorSet.start(AnimatorSet.java:729)
at android.animation.AnimatorSet.start(AnimatorSet.java:684)
at np.com.susanthapa.curved_bottom_navigation.CurvedBottomNavigationView.animateItemSelection(CurvedBottomNavigationView.kt:534)
at np.com.susanthapa.curved_bottom_navigation.CurvedBottomNavigationView.onMenuItemClick(CurvedBottomNavigationView.kt:490)
at np.com.susanthapa.curved_bottom_navigation.CurvedBottomNavigationView.setupWithNavController$lambda-6(CurvedBottomNavigationView.kt:387)
at androidx.navigation.NavController.addOnDestinationChangedListener(NavController.kt:402)
at np.com.susanthapa.curved_bottom_navigation.CurvedBottomNavigationView.setupWithNavController(CurvedBottomNavigationView.kt:378)
at com.ccninfotech.cybervpnpro.ui.MainActivity.handleBottomNavigation(MainActivity.kt:160)
at com.ccninfotech.cybervpnpro.ui.MainActivity.onCreate(MainActivity.kt:85)
at android.app.Activity.performCreate(Activity.java:8305)
at android.app.Activity.performCreate(Activity.java:8284)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

how can we add badge count in menu item?

As we are using this component as bottom navigation View we require to know about badge counts.it is the most important thing of navigation library.

is there any way to show badges in this library or not ?

App crash every time.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jeuxdevelopers.prayerwatch/com.jeuxdevelopers.prayerwatch.activities.main.MainActivity}: java.lang.ClassCastException: android.graphics.drawable.VectorDrawable cannot be cast to android.graphics.drawable.AnimatedVectorDrawable
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.ClassCastException: android.graphics.drawable.VectorDrawable cannot be cast to android.graphics.drawable.AnimatedVectorDrawable
at androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat.start(AnimatedVectorDrawableCompat.java:711)
at np.com.susanthapa.curved_bottom_navigation.CurvedBottomNavigationView.setupInitialAVD(CurvedBottomNavigationView.kt:311)
at np.com.susanthapa.curved_bottom_navigation.CurvedBottomNavigationView.setMenuItems(CurvedBottomNavigationView.kt:305)
at np.com.susanthapa.curved_bottom_navigation.CurvedBottomNavigationView.setMenuItems$default(CurvedBottomNavigationView.kt:286)
at com.jeuxdevelopers.prayerwatch.activities.main.MainActivity.setBottomNavMenu(MainActivity.kt:42)
at com.jeuxdevelopers.prayerwatch.activities.main.MainActivity.init(MainActivity.kt:20)
at com.jeuxdevelopers.prayerwatch.activities.main.MainActivity.onCreate(MainActivity.kt:16)
at android.app.Activity.performCreate(Activity.java:6747)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) 
at android.app.ActivityThread.-wrap12(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6119) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 

Lag when switching tabs

when I touch a menu to change fragment , bottom navigation animation lags.
it work properly if destination fragment is empty

Gap between the main view and the navigation

How can I remove the gap between a view and the bottom navigation?

The FragmentContainerView is constrained app:layout_constraintBottom_toTopOf="@+id/nav_view" where the nav_view is the CurvedBottomNavigationView, in this case there is a white gap.

I cant set app:layout_constraintBottom_toBottomOf="parent" cause I have some recycler view and the last item when I scroll is invisible

Can't set colors programmatically

Hi !
I really appreciate this library. But I found something that, in my case, seems problematic.
I currently have a need to set most colors programmatically in my app, and that the case for a bottomNavBar.

The problem is, using Java (didn't try using Kotlin), though I seems to be able to set the different colors, nothing change when the view is displayed.

bellow is an example of what I tried :

bottomNav.setFabBackgroundColor(colors.getIntPrimaryColor()); bottomNav.setNavBackgroundColor(colors.getIntPrimaryColor()); bottomNav.setSelectedColor(colors.getIntTextOnPrimary()); bottomNav.setUnSelectedColor(colors.getIntTextOnPrimary());

Is there any way to set (or change) the colors programmatically ?
If not would you be interested in implementing this ?

No avd icon

Great library and work. I would like to know how to use this library without animated icons(only simple drawable icons) in CbnMenuItem?

png icon color issue

When i am using png icon for menu item its tint always is in white color but when i am using vector icon its working fine .But i want to use different icons as png but unSelected color is not working on them and png icon tint is always white

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.