Giter VIP home page Giter VIP logo

gauravk95 / bubble-navigation Goto Github PK

View Code? Open in Web Editor NEW
1.7K 1.7K 211.0 9.26 MB

๐ŸŽ‰ [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of ๐ŸŽจ customization option.

License: Apache License 2.0

Kotlin 18.06% Java 81.94%
android android-library android-ui android-ui-insipired bottom-navigation bottomnavigation bottomnavigationbar bottomnavigationview library material-design navbar navigation navigation-view navigationbar navigationview widget

bubble-navigation's Introduction

Hi there ๐Ÿ‘‹, I'm Gaurav!

AR/VR | AI/ML | Android | 3D Mobile Graphics | Backend

Experienced Software Engineer & team lead with proven track record of architecting mobile applications from ground up.
Expertise in Video Conference, AR/VR, Camera, Computer Vision, Machine Learning, Audio, Video, OTT, Social Media.
Part of the Core Team at multiple startups.
  • ๐Ÿ”ญ Working on my own product in GenAI Space
  • ๐ŸŒฑ Currently learning AI/ML and Computer Vision
  • ๐Ÿ‘ฏ Looking to collaborate on interesting projects in AR/VR and AI/ML space
  • ๐Ÿ’ผ Open for paid freelance projects
  • ๐Ÿ“ซ Reach me: [email protected]

bubble-navigation's People

Contributors

gauravk95 avatar monomagentaeggroll 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  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

bubble-navigation's Issues

OnResume How to State change in Java Code

Hello
Good Evening , Please mention me when anther activity on success then button cuurent state position are not showing by defult home state are show . please help mee

how to make item not selectable ?

I want to show fragments and activity both. Suppose i have 5 items from which i have to open activity for 3rd item. When i switch to activity and come back 3rd item gets selected.How to make it select the last user visible item?

Not work in API 32

Could not find com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3. in SDK 32

rounded corner

excuse me
i want to know how i could rounded top right & top left corner of this bottom navigation

Title text Color limitation

I want to the different color of title from Icon but I can't.
the app:bt_colorActive set color for both Icon and Title.
So, how to do it?

android component navigation not working

when I want to use custom navigation (BubbleNavigationLinearView) in android component navigation I can't use them because I can't find any code for replacing with below code and "setupWithNavController" feature is not enabled for this custom navigation, just enable for "bottom navigation".

BubbleNavigationLinearView navigation;
NavController navController;

navigation = findViewById(R.id.navigation);
navController = Navigation.findNavController(this, R.id.fragment);

navigation.setupWithNavController(navController); <---------------------- for this one
so if you know my problem answers please help me.

not showing xml code

when i add the dependancy in the gradle the gradle sysnc perfectly but when i past the xml code of bubble nav bar it does not show up

Text cut

When apply custom font then text cut in bubble view.

Use multiple drawable for items .

I think use only a single drawable is enough for menu item . and (tint )change the color according the .

app:bt_shape="@drawable/transition_background_drawable_home"

Set custom font

Thanks for this great library.
How can i set custom font for texts?

[RFC] Closing pull requests while a new build is starting causes failures

Build failures often indicate a fault with the software being built such as compilation or test failures. However, there is a subset of build failures (called environmental or non-verification failures) that are not expected within a standard application development lifecycle, such as build configuration failures, dependency resolution failures, infrastructure failures, and so on.

Problem: One type of environmental failure is due to due to git references being no longer available at the time a build job starts. For example, pull requests are merged shortly before the start of the scheduled build, causing a build failure due to an unfound (because merged) branch. In your project, we detected 1 failure of this type over the May-June timespan. For instance, we found that Build #26 did not pass due to the above issue.

Solution: It is generally recommended to wait for the build results before merging a pull request. If you wish to skip builds you may also use the SKIP CI tag in your commit message. Additionally, it is also possible to skip builds containing non-code changes as shown in this example and below:

+ before_install:
+  - |
+      if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(.md)|(.png)|(.pdf)|(.html)|^(LICENSE)|^(docs)'
+      then
+        echo "Only doc files were updated, not running the CI."
+        exit
+      fi

Disclaimer: I developed a tool that repairs environmental build failures and I am now evaluating its usefulness for open-source projects.

Please up/downvote the issue to indicate whether you agree/disagree with the report and the proposed fix.

new intent in bottom navigation

how can i use bottom nevigation to change activity in bottom click
becouse there is not any option to change state

BubbleNavigationLinearView bubbleNavigation = (BubbleNavigationLinearView)findViewById(R.id.bottom_navigation_view_linear);

bubbleNavigation.setNavigationChangeListener(new BubbleNavigationChangeListener() {
    @Override
    public void onNavigationChanged(View view, int position) {
        switch (position.getItemId())
    }
});

getItemId showing error so how can i choose id to change activity in on click

@gauravk95
Owner

Nullpointer when trying to inital start with other then first item

I'm trying to start wit another then the first item in Bubble-Navigation, but when i try to setCurrentActiveItem in onViewCreated I get a NullPointer (see below). How can I achieve to initial select another than the first item?

The exception:

java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
        at com.gauravk.bubblenavigation.BubbleNavigationConstraintView.setCurrentActiveItem(BubbleNavigationConstraintView.java:294)

This is my code, nothing very special here, just trying to keep viewpager and navigation in sync and have the possibility to start with last item:

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        adapter = Adapter(childFragmentManager)
        cv_navigation.setNavigationChangeListener { navView, position ->
            viewPager.setCurrentItem(position,true)
        }
        viewPager.adapter = adapter
        viewPager.addOnPageChangeListener(object: ViewPager.OnPageChangeListener {
            override fun onPageScrollStateChanged(state: Int) {
            }

            override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
            }

            override fun onPageSelected(position: Int) {
                    cv_navigation.setCurrentActiveItem(position);
            }
        })
        if (arguments != null && savedInstanceState == null && arguments!!.getBoolean(USE_LAST)) {
            viewPager.currentItem = adapter!!.count - 1;
        }
    }

Invalid drawable tag vector on pre Lollipop

Caused by: android.content.res.Resources$NotFoundException: File res/drawable/ic_artist.xml from drawable resource ID #0x7f0700b8
        at android.content.res.Resources.loadDrawable(Resources.java:2842)
        at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
        at com.gauravk.bubblenavigation.BubbleToggleView.init(BubbleToggleView.java:118)
        at com.gauravk.bubblenavigation.BubbleToggleView.<init>(BubbleToggleView.java:71)
     Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #1: invalid drawable tag vector
        at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:917)
        at android.graphics.drawable.Drawable.createFromXml(Drawable.java:858)
        at android.content.res.Resources.loadDrawable(Resources.java:2839)
        at android.content.res.TypedArray.getDrawable(TypedArray.java:602)ย 
        at com.gauravk.bubblenavigation.BubbleToggleView.init(BubbleToggleView.java:118)ย 
        at com.gauravk.bubblenavigation.BubbleToggleView.<init>(BubbleToggleView.java:71)ย 

maybe VectorDrawableCompat.create() shoud fix it?

Cannot use databinding with bt_title

I want to use databinding with bt_title.
How can i do it?

<com.gauravk.bubblenavigation.BubbleToggleView
                android:id="@+id/l_item_home"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:bt_active="true"
                app:bt_colorActive="@color/red_active"
                app:bt_colorInactive="@color/red_inactive"
                app:bt_icon="@drawable/ic_home"
                app:bt_shape="@drawable/transition_background_drawable_home"
                app:bt_title="@{String.valueOf(viewmodel.currentNumber)}" />

Class problem/Error

activity_main.xml

<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    
    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:animateLayoutChanges="true"
        android:fitsSystemWindows="true"
        android:layout_above="@+id/bottomNavigationView">

        <com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:theme="@style/AppTheme.AppBarOverlay">

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="?attr/colorPrimary"
                app:popupTheme="@style/AppTheme.PopupOverlay"/>

        </com.google.android.material.appbar.AppBarLayout>

        <FrameLayout
            android:id="@+id/fragment_container"
            android:layout_width="match_parent"   
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

	<com.gauravk.bubblenavigation.BubbleNavigationConstraintView
        android:id="@+id/top_navigation_constraint"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="380dp"
        android:background="#FFFFFDFB"
        android:elevation="4dp"
        android:padding="12dp"
        app:bnc_mode="spread">

        <com.gauravk.bubblenavigation.BubbleToggleView
            android:id="@+id/c_item_rest"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:bt_active="true"
            app:bt_colorActive="#FFFDE9DF"
            app:bt_colorInactive="#FFF7F7F7"
            app:bt_icon="@drawable/iconoir_home"
            app:bt_shape="@drawable/iconoir_home"
            app:bt_title=""
            app:bt_padding="8dp"
            app:bt_titlePadding="0dp" />


    </com.gauravk.bubblenavigation.BubbleNavigationConstraintView>
</RelativeLayout>

Error :

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app/com.example.app.activities.MainActivity}: android.view.InflateException: Binary XML file line #37: Binary XML file line #37: Error inflating class com.gauravk.bubblenavigation.BubbleNavigationConstraintView
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2572)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
	at android.app.ActivityThread.-wrap11(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
	at android.os.Handler.dispatchMessage(Handler.java:111)
	at android.os.Looper.loop(Looper.java:207)
	at android.app.ActivityThread.main(ActivityThread.java:5728)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: android.view.InflateException: Binary XML file line #37: Binary XML file line #37: Error inflating class com.gauravk.bubblenavigation.BubbleNavigationConstraintView
	at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
	at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
	at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
	at com.example.app.activities.MainActivity.onCreate(MainActivity.java:23)
	at android.app.Activity.performCreate(Activity.java:6301)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
	... 9 more
Caused by: android.view.InflateException: Binary XML file line #37: Error inflating class com.gauravk.bubblenavigation.BubbleNavigationConstraintView
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
	... 17 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.gauravk.bubblenavigation.BubbleNavigationConstraintView" on path: DexPathList[[zip file "/data/app/com.example.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.app-1/lib/arm, /vendor/lib, /system/lib]]
	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
	at android.view.LayoutInflater.createView(LayoutInflater.java:583)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
	... 21 more
	Suppressed: java.lang.NoClassDefFoundError: com.gauravk.bubblenavigation.BubbleNavigationConstraintView
		at dalvik.system.DexFile.defineClassNative(Native Method)
		at dalvik.system.DexFile.defineClass(DexFile.java:226)
		at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
		at dalvik.system.DexPathList.findClass(DexPathList.java:338)
		at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
		... 25 more
	Suppressed: java.lang.ClassNotFoundException: com.gauravk.bubblenavigation.BubbleNavigationConstraintView
		at java.lang.Class.classForName(Native Method)
		at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
		at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
		... 24 more
	Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Issue with text being cutoff on buttons

Even with only 3 buttons, the third button's text is cut off.

Text: "Dashboard"
Text visible: "Dashboar"

Would it be possible to allow configuration of padding around the textview?

bt_icon not changing on state changed.

I am trying to change Icon of selected tab based on selection but not able to change it.

I am using Selector to switch the icons.
Icons do not support vector images (SVGs) below API level 23.

Use in activitymain.xml

 <com.gauravk.bubblenavigation.BubbleToggleView
                android:id="@+id/tab_home"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:bt_active="true"
                app:bt_badgeTextColor="@color/darkPurple"
                app:bt_colorActive="@color/darkPurple"
                app:bt_colorInactive="@color/light_black"
                app:bt_icon="@drawable/home_tab_selector"
                app:bt_padding="10dp"
                app:bt_shape="@drawable/background_stroke"
                app:bt_title="@string/home_tab"
                app:bt_titleSize="12dp"/>

Selector: home_tab_selector.xml

<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@drawable/icon1" android:state_active="true" />
    <item android:drawable="@drawable/icon2" android:state_active="false" />

</selector>

Moreover, elevation is not working as it should. Also not getting the Shadow effect.

Is there any other way to do so? Please let me know.

Thanks.

Add Real fragments

How to Add fragments instead of colors

your code
ArrayList fragList = new ArrayList<>();
fragList.add(ScreenSlidePageFragment.newInstance(getString(R.string.home), R.color.red_inactive));
fragList.add(ScreenSlidePageFragment.newInstance(getString(R.string.search), R.color.blue_inactive));

i want

ArrayList fragList = new ArrayList<>();
fragList.add(new firstFragement());
4 more.

please look in to it

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.