Outlined input label not showing while using React Native LayoutAnimation in Android
See original GitHub issueEnvironment
software | version |
---|---|
ios or android | android |
react-native | https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz |
react-native-paper | 4.7.2 |
node | 15.4.0 |
npm or yarn | yarn |
expo sdk | 40.0.0 |
Outlined input label not showing while using React Native LayoutAnimation in Android . Note: ios also works well.
Code:
import {
// something...
LayoutAnimation,
UIManager,
Platform
} from 'react-native';
if (
Platform.OS === 'android'
&& UIManager.setLayoutAnimationEnabledExperimental
) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
// Somethingg....
const _animationClick = () => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.spring);
setIsRegister(!isRegister);
};
// Somethingg…
{isRegister && (
<View style={Styles.input}>
<TextInput
label={i18n.t('login.email')}
value={email}
mode="outlined"
onChangeText={_onChangeEmail}
/>
<HelperText type="error" visible={errors.email}>
Email address is invalid!
</HelperText>
</View>
)}
Thank you for your help
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Layout Animation does not work on Android even with ...
I've added the below code for the same. import { LayoutAnimation, NativeModules } from 'react-native'; // Animation setup for android const { ...
Read more >ViewGroup - Android Developers
If you are implementing XML layout attributes as shown in the example, ... android:layoutAnimation, Defines the layout animation to use the first time...
Read more >PDF React Native - Tutorialspoint
This tutorial is designed for JavaScript and React developers who aspire to learn mobile building skills. By following this course, you will expand...
Read more >LayoutAnimation - React Native
Note that in order to get this to work on Android you need to set ... onAnimationDidEnd, function, No, Called when the animation...
Read more >Drag and Drop Tags in React Native, Part 1 of 2: The Basics ...
If you're not familiar with create-react-native-app check out Building ... Next, let's start working on Tags component highlighted in the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like the issue is related to
LayoutAnimation
which is experimental on Android platform. I can suggest you to write your custom spring animation.Thanks for your answer @lukewalczak. I will try your suggestion.