susonthapa / curved-bottom-navigation Goto Github PK
View Code? Open in Web Editor NEWA simple bottom navigation with animating cut out
License: Apache License 2.0
A simple bottom navigation with animating cut out
License: Apache License 2.0
.UnsupportedOperationException: Sorting went bad, the start event should always be at index 0
After all, the method is named "CLICK"listener, and not "CHANGE"listener, lol.
Could you change that behavior? I probably can change it myself and send a PR, tho, if you would be willing to accept.
When I try to rebuild the app I get this error:
Could not GET 'https://dl.bintray.com/susonthapa/curved-bottom-navigation/np/com/susanthapa/curved_bottom_navigation/curved_bottom_navigation/0.6.3/curved_bottom_navigation-0.6.3.pom'. Received status code 403 from server: Forbidden
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.
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
how to add text in item
?
How to add text below the non-selected tabs. I really need this feature and I believe it is useful for others as well.
Great job for your library. I'm asking if it supports a curved edge to up like seen here bottom-navigation-round-selector. Otherwise, it's a possible enhancement to add.
how can we increase the size of the vector drawn in the FAB and in the bottom bar itself? Thanks!
i like your library but someone maybe find library JAVA not Kotlin. so next time also add JAVA library. thanks~
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.
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?
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)
I cloned your project but it doesn't seem to be able to run, getting different errors each time. Don't know what it could be.
Also, is there a way to not use an action bar? (the one on top)
check the stack trace here: https://hastebin.com/share/ifagofosiw.php
why added tow icon in one fab ?
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 ?
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)
when I touch a menu to change fragment , bottom navigation animation lags.
it work properly if destination fragment is empty
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
I want to use this awesome library for my JAVA project but unable to do so,
Can you please provide the sample code for it?
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 ?
Great library and work. I would like to know how to use this library without animated icons(only simple drawable icons) in CbnMenuItem?
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.