fawaz-ahmed / react-native-read-more

React native library to show text in a condensed way and expand when needed. Drop in replacement for Text component and highly customizable. Can be used with expo or native cli for react native.
https://www.npmjs.com/package/@fawazahmed/react-native-read-more
MIT License
275 stars 37 forks source link

after using this library all my screen has animation #71

Closed hotaryuzaki closed 1 year ago

hotaryuzaki commented 2 years ago

it's weird issue, after using this package in one of my screen then suddenly all my screen has animation. example:

when i remove the import script of this package, all the animation is gone.

hotaryuzaki commented 2 years ago

i think this is the problem

if (Platform.OS === 'android') {
  if (UIManager.setLayoutAnimationEnabledExperimental) {
    UIManager.setLayoutAnimationEnabledExperimental(true);
  }
}

this feature create bugs,

fawaz-ahmed commented 2 years ago

@hotaryuzaki you can disable animation by passing animate={false}

hotaryuzaki commented 2 years ago

@hotaryuzaki you can disable animation by passing animate={false}

read more animation is disable but the problem still exist

it solves when i change to this

if (Platform.OS === 'android') {
  if (UIManager.setLayoutAnimationEnabledExperimental) {
    UIManager.setLayoutAnimationEnabledExperimental(false);
  }
}
fawaz-ahmed commented 2 years ago

@hotaryuzaki I will remove this piece of code from my lib to enable layout animation, since that should be handled by the app itself. Will raise a PR soon.