Giter VIP home page Giter VIP logo

bubbletabbar's Introduction

bubbletabbar's People

Contributors

akshay2211 avatar andre00nogueira avatar codacy-badger avatar dawnimpulse avatar islamkhsh avatar vkotovv 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

bubbletabbar's Issues

How To Perform Android Instrument Testing

How to perform android Instrument testing something like :
onView(withId(R.id.bubbleTabBar)).perform(NavigationViewActions.navigateTo(R.id.navigation_user_profile))

or how to perform click to R.id.bubbleTabBar menu

First bubble text shown on activity recreate from saved state

Hello, thank you for your great work on useful library!

I found a small bug relatively long time ago, but cannot find a way to reproduce it.
Now I can :)

When user left from the app on 2 or any next page and activity with viewpager recreated from saved state after app resume, colored text of first bubble unexpectedly shown. This behaviour can be forced (for testing purpose only, of course) in developer settings in this way: https://stackoverflow.com/a/19622671

I attached screenshot of sample app with force "do not keep activities" enabled.
(In real world this process may take a long time, but it will definitely happen)

image

Please take a look at this when you have time)

Icon color

Thanks you akshay2211 for providing me a great library. I love using it!
But, How I can keep my icon color?

Attempt to invoke virtual method 'int io.ak1.Bubble.getId()' on a null object reference

My app implement navigation controller. I got this error when try to navigate to another fragment within navigation graph.
My first MovieFragment has deep link to MovieDetailFragment.

Error log :

java.lang.NullPointerException: Attempt to invoke virtual method 'int io.ak1.Bubble.getId()' on a null object reference
        at io.ak1.BubbleTabBar.setSelectedWithId(BubbleTabBar.kt:69)
        at com.kadon.moviebasejetpack.MainActivity.onCreate$lambda-1(MainActivity.kt:40)
        at com.kadon.moviebasejetpack.MainActivity.lambda$m7AD07XFDrhvcoED8pyMVzjbbRU(Unknown Source:0)
        at com.kadon.moviebasejetpack.-$$Lambda$MainActivity$m7AD07XFDrhvcoED8pyMVzjbbRU.onDestinationChanged(Unknown Source:2)
        at androidx.navigation.NavController.dispatchOnDestinationChanged(NavController.java:504)
        at androidx.navigation.NavController.navigate(NavController.java:1149)
        at androidx.navigation.NavController.navigate(NavController.java:944)
        at androidx.navigation.NavController.navigate(NavController.java:877)
        at androidx.navigation.NavController.navigate(NavController.java:863)
        at com.kadon.moviebasejetpack.ui.movie.MovieFragment.onClickedCharacter(MovieFragment.kt:56)

This is my MainActivity :

override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)

        val bubble = binding.bubbleTabBar

        val navHostFragment = supportFragmentManager.findFragmentById(
            R.id.nav_host_fragment_activity_main
        ) as NavHostFragment
        navController = navHostFragment.navController

        appBarConfiguration = AppBarConfiguration(navController.graph)
        setupActionBarWithNavController(navController, appBarConfiguration)

        bubble.addBubbleListener { id ->
            bubble.onNavDestinationSelected(id, navController)
        }

        navController.addOnDestinationChangedListener { _, destination, _ ->
            bubble.setSelectedWithId(destination.id, false)
        }

    }

This HomeFragment list onclick listner :

private fun onClickedCharacter(id: Int) {
        findNavController().navigate(
            R.id.action_navigation_movie_to_navigation_movie_detail,
            bundleOf("id" to id)
        )
    }

Animation time

Animation time not fit to ViewPager2 animation time. I suggest to add an additional parameter to set it or decrease this value from 350ms to 250ms.

Pager

I want when creating the first page, the second page will be created instead of having to choose page 2. If I do it the current way, when creating page 1 and I switch to a new page, the application will be quite laggy, I need to solve this problem

Java compatible

Hello @akshay2211

This is good library, but it make more flexible if you show java compatibility, Please elaborate your kotlin classes in java Structure or how to use this library in java.

Thanks

different fragment

How do you make the bubble tab move right and left like a tab layout with different fragments?

Change selected item programatically

Sometimes there's a need to change the selected item programatically, without the user clicking the item (automatic navigation based on certain actions). Is there a function to do it with this library?

Background is not set properly for API < 23

It is a GradientDrawable.setTint() issue. Solution for LinearLayout.setCustomBackground(color: Int, alpha: Float) method:

DrawableCompat.setTint( DrawableCompat.wrap(drawable), color)

ViewPager2 Support

Hey akshay2211,
I just updated my project from ViewPager to ViewPager2 and found out that your library does not support it. Are there any thoughts of updating your code?
Btw, can you please suggest any work-around solutions to alternate this:

fun setupBubbleTabBar(viewPager: ViewPager) {
        viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
            override fun onPageScrollStateChanged(state: Int) {
            }

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

            override fun onPageSelected(position: Int) {
                setSelected(position)
            }
        })
    }

Thanks.
Ionate12

Customize MenuItem title.

Hi akshay2211,
Thanks you for providing me a great library. I love using it!

However, it restricts me to customize the MenuItem titles. I found no way to modify it.

I would appreciate if you could guide me how to change, or maybe improve it in latter version.

Regards,

Bubble tab stutters

Hi,

I am trying to load BubbleTabBar in my activity. But because there was slow loading I set offScreenPageLimit to 1 (default). I have checked network calls in my app prior to setting offscreenpagelimit to my viewpager.

Everything loads properly but when I try to switch between the tabs, it stutters. The transition isn't smooth. Noticing a lag.

Can you help?

Custom Font

For "app:bubbletab_custon_font" attribute, suggestions show @Strings which is wrong IMHO, It should show @font instead. Please reply how can one apply custom font.

Regards

Make tab scrollable

First of all, thanks for your library!
I've got a problem with BubbleTabBar: while it looks awesome on my tablet on my phone if I've got too many items the icons are squished/cut and the same happens with the text.
Since I can't remove any item from this bar, do you think it's possible to make it scrollable to fit (theorically) any number of items without cutting them?

Screenshot_20200217_180341_it tipsyapp caneva

Java Programing

I use the Java programming language, but when calling ID on the menu there is always an error "Constant expression required"

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.