useReanimatedKeyboardAnimation is not animating the progress value
See original GitHub issueDescribe the bug The progress shared value returned from useReanimatedKeyboardAnimation does not progress the value from 0 to 1
Code snippet
const Example = () => {
const {progress, height} = useReanimatedKeyboardAnimation();
const rStyle = useAnimatedStyle(() => {
return {
backgroundColor: 'gray',
height: Math.abs(height.value),
width: interpolate(progress.value, [0, 1], [100, 200]),
};
}, []);
return (
<SafeAreaView
style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
<TextInput
style={{
borderWidth: 1,
padding: 10,
borderColor: 'brown',
width: '100%',
}}
/>
<Button title="dismiss" onPress={() => Keyboard.dismiss()} />
<Animated.View style={rStyle} />
</SafeAreaView>
);
};
Repo for reproducing https://github.com/itsramiel/animated-keyboard
Expected behavior progress shared value do not suddenly switch between 0 and 1, but progress the value between the range 0 and 1 as the keyboard opens
Screenshots
Smartphone (please complete the following information):
- Desktop OS: [MacOS
- Device: iiPhone8 plus
- OS: iOS 16
- RN version: 0.70.x
- RN architecture: [e.g. old/new or paper/fabric]
- JS engine: Hermes
- Library version: 1.3.0
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
html5 progress bar not animating - Stack Overflow
I have HTML5 tag, I added some styles for it and add animation for stripe but it doesn't work as I want. I'm...
Read more >First animation | Keyboard Controller - GitHub Pages
useKeyboardAnimation returns Animated values with enabled Native Driver ( useNativeDriver: true ). Thus some properties can not be animated, such as height , ......
Read more >animation - CSS: Cascading Style Sheets - MDN Web Docs
An animation-name value is not required to be declared in the animation shorthand property. If no name exists, there is no animation to ......
Read more >Animating Progress - Snook.ca
We now have something that looks reasonably consistent across browsers. Changing Progress Value. To animate progress, we need to have the value ......
Read more >Progress Bar — Toga 0.3.0.dev39 documentation
ProgressBar(max=100, value=1) # Update progress progress.value = 10. A progress bar can be in one ... Note: Not every platform may support these...
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
appreciate your effort 🚀
Hi @itsramiel Thank you for the issue. This problem does indeed exist and it’s pointed out in documentation:
I’m working on a solution and hopefully in next upcoming release (
1.4.0
) it will be fixed 🤞