Coder Social home page Coder Social logo

hide bottom bar on scroll about bottombar HOT 5 CLOSED

roughike avatar roughike commented on May 18, 2024 6
hide bottom bar on scroll

from bottombar.

Comments (5)

roughike avatar roughike commented on May 18, 2024

@FabianTerhorst
Will do, and thanks for the link.

from bottombar.

NikolaDespotoski avatar NikolaDespotoski commented on May 18, 2024

@FabianTerhorst @roughike Hi guys, I'm the author of the mentioned behavior and article. I forked the repo and tried to add it to the lib. It wont work because of two things:

First: BottomBar is attached to content view which is FrameLayout not CoordinatorLayout
Second: The content is always above it, not behind it. Which means that it will leave empty (window background color will be visible) space when the BottomBar is hidden.

I assume this is for favoring the SnackBars, but they should be handled by behavior (lol, mine doesnt care about snackbars)

Also the content view should be given a proper padding in order the bottom bar and content view do not overlap. This would be applicable if the BottomBar is not attached directly to the android.R.id.content.

IMHO, the BottomBar should not be added directly to the content view, it should work like any other view.Basically, BottomBar should work as ViewGroup out of the box. This is totally subjective opinion and should not be taken as true.

Possible solution is checking if the child at 0 is CoordinatorLayout and avoid removing it in attach method. I mean overall rearrangement of the views. This needs tremendous efforts to be invested, because we have a unknown number of child inside CoordinatorLayout add padding so the content does not overlap.

What I have tried:

Binding the behavior whenever LayoutParams are added to the BottomBar.

I'm subscribing this issue for any comments.

from bottombar.

roughike avatar roughike commented on May 18, 2024

@NikolaDespotoski
Huge thanks for your awesome gist! I modified your code a bit and although it took a while, I finally got it to work.

This is now supported starting from version 1.1.4. See here for instructions.

Demo:

from bottombar.

roughike avatar roughike commented on May 18, 2024

@NikolaDespotoski

IMHO, the BottomBar should not be added directly to the content view, it should work like any other view.Basically, BottomBar should work as ViewGroup out of the box. This is totally subjective opinion and should not be taken as true.

I might make some kind of BottomBarLayout ViewGroup that auto-detects the user's content layout available in the future.

Currently there shouldn't be nothing that can't be done with the BottomBar just because it can't be used by XML. I'm busting my ass implementing everything in the Material Design spec (and squashing bugs all the time), so the XML usage is low priority ATM.

from bottombar.

mehrdad-shokri avatar mehrdad-shokri commented on May 18, 2024

@NikolaDespotoski, @roughike Thnaks for exmplanations.
As you can see the navigation bottoms don't go transparent on scroll to down.
Do you know any way to achieve this?
I've been able to achive this result, but bottom bar is hiding behind navigation bottom instead of just hiding.

from bottombar.

Related Issues (20)

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.