Giter Club home page Giter Club logo

Comments (7)

cesardeazevedo avatar cesardeazevedo commented on May 28, 2024 1

Hi, you need to enable the following scrollFlags:

SCROLL_FLAG_SCROLL | SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED | SCROLL_FLAG_ENTER_ALWAYS

Here's a practical example.

<CollapsingToolbarLayout
  title='Collapsing Toolbar'
  scrollFlags={
      AppBarLayout.SCROLL_FLAG_SCROLL
    | AppBarLayout.SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED
    | AppBarLayout.SCROLL_FLAG_ENTER_ALWAYS
    }>
</CollapsingToolbarLayout>

Let me know if you got it.

from react-native-collapsing-toolbar.

Noitidart avatar Noitidart commented on May 28, 2024

Thank you @cesardeazevedo! It's not working yet but i think this is on me. Its great to know this is possible! Thanks for your awesome module and share!!

from react-native-collapsing-toolbar.

Noitidart avatar Noitidart commented on May 28, 2024

I'm trying to create all the demos shown here - https://guides.codepath.com/android/Handling-Scrolls-with-CoordinatorLayout#responding-to-scroll-events

Once I figure each one out I'll share with you here so we can add it to readme to show others. :)

from react-native-collapsing-toolbar.

Noitidart avatar Noitidart commented on May 28, 2024

Does this module also work on bottom bar?

Like this: https://cdn-images-1.medium.com/max/1200/1*5XuieX7b6u2SkLDd9KEJyg.gif

I was trying to also acheive the demos from here - https://android.jlelse.eu/scroll-your-bottom-navigation-view-away-with-10-lines-of-code-346f1ed40e9e

from react-native-collapsing-toolbar.

cesardeazevedo avatar cesardeazevedo commented on May 28, 2024

It should work since everything is back by a CoordinatorLayout, a truly BottomNavigationView should work, but haven't seen any BottomNavigationView bridge for react-native yet, so can't say how.

from react-native-collapsing-toolbar.

Noitidart avatar Noitidart commented on May 28, 2024

@cesardeazevedo I found a native bottom navigation view in react-native here - https://github.com/prscX/react-native-android-bottom-navigation - but I wasn't able to get it to play nicely as we talked about above. Would you be able to experiement if you have some time maybe? :)

from react-native-collapsing-toolbar.

cesardeazevedo avatar cesardeazevedo commented on May 28, 2024

Thanks for sharing it.

I just saw they move to a JS solution, sadly 😞

This is one those things that would play nicely inside a native navigation solution, such as airbnb native-navigation, but that's not something easy to do.

But anyway, i still have my doubts about how that could works, but i will give a try, thanks for sharing it.

from react-native-collapsing-toolbar.

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.