Giter Club home page Giter Club logo

Comments (10)

cesardeazevedo avatar cesardeazevedo commented on May 28, 2024

Hi, thanks for report, have you experience this issue even with a production build? which react-native version are you using?

from react-native-collapsing-toolbar.

magestein avatar magestein commented on May 28, 2024

Hi Cesar, thats happen in react-native 0.55.0.. and also happen with '--variant=release'.
Is there a suggestion of compatibility with some version of react-native?
Thanks

from react-native-collapsing-toolbar.

cesardeazevedo avatar cesardeazevedo commented on May 28, 2024

I haven't tried new version from react-native yet, so i presume that new versions "just works".

Have you tried call the redraw() function from the AppBarLayout ref on componentDidMount or when the app came back from the background (by AppState)?

from react-native-collapsing-toolbar.

magestein avatar magestein commented on May 28, 2024

I have try:

_handleAppStateChange = (nextAppState) => {
    if (this.state.appState.match(/inactive|background/) && nextAppState === 'active') {
        this.appBar.redraw();
    }
    this.setState({appState: nextAppState});
};

componentDidMount() {
    AppState.addEventListener('change', this._handleAppStateChange);
}

componentWillUnmount() {
    AppState.removeEventListener('change', this._handleAppStateChange);
}

<AppBarLayout ref={(ref) => { this.appBar = ref }}>
</AppBarLayout>

but without luck :(

from react-native-collapsing-toolbar.

magestein avatar magestein commented on May 28, 2024

I have noted that redraw() some times work and some times not. Maybe the code that I showed is wrong?

from react-native-collapsing-toolbar.

cesardeazevedo avatar cesardeazevedo commented on May 28, 2024

Interesting, i will take a look at it as soon as i get some time this week

from react-native-collapsing-toolbar.

magestein avatar magestein commented on May 28, 2024

Thank you! I appreciate that very much!

from react-native-collapsing-toolbar.

cesardeazevedo avatar cesardeazevedo commented on May 28, 2024

Hi, sorry for delayed response, i've fully reproduced your issue on my simulator, and i have tested your code and worked, i tested multiple times and never had any single attempt that didn't worked.

Here's a demonstration
collapsing

Or maybe i am testing wrong? any idea?

I also don't think this is the best solution at all, it's actually really hard to understand how native modules behave in certain situations, i will still think in some pleasant solution.

from react-native-collapsing-toolbar.

mahmoudelfeky avatar mahmoudelfeky commented on May 28, 2024

try it in on real device you will see the problem

from react-native-collapsing-toolbar.

A-ANing avatar A-ANing commented on May 28, 2024

@magestein Hello, how did you solve it? I'm just like you, but I happened when the application was started, not when the application was waked up. #21

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.