It is not working on android
See original GitHub issueWhich OS ?
Windows
Version
10 Which versions are you using:
- react-native-swiper v1.5.13
- react-native v0.55
Expected behaviour
Expect to load a sliding carousel on android
Actual behaviour
displays this weird screen
How to reproduce it-
import React from "react";
import {
Dimensions,
View,
StyleSheet,
Text,
Platform
} from "react-native";
import Swiper from "react-native-swiper";
class Splash extends React.Component {
render() {
return (
<View style={styles.container}>
<View style={{height: 200,alignItems:'flex-start'}}>
<Swiper
showsButtons={false}
loop={false}
>
<View style={styles.container}>
<Text>
Fun
</Text>
</View>
<View style={styles.container}>
<Text>
play,chat,have fun
</Text>
</View>
</Swiper>
</View>
</View>
);
}
}
export default Splash;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Steps to reproduce
Try running on expo
Issue Analytics
- State:
- Created 5 years ago
- Comments:18
Top Results From Across the Web
Fix an installed Android app that isn't working
Step 1: Restart & update ... Important: Settings can vary by phone. For more info, contact your device manufacturer. On most phones, press...
Read more >are my apps not working on my Android phone
How to fix android apps not working · Reboot your phone · Update or roll back Android System WebView app · Check and...
Read more >Top 8 Ways to Fix Apps Won't Open on Android
App glitches, corrupted cache data, and outdated Android OS are prominent reasons behind the apps not opening on Android.
Read more >Your Android Phone or Tablet Won't Turn On? 6 Ways to Fix
Check Your Connections. Firstly, check the obvious points. · Dirt and Dust. Next, ensure there's no dust, dirt, or other gunk clogging up...
Read more >Android Apps Not Working? Try These Fixes
Possible Fixes for Unresponsive Android Apps · Roll Back to an Older Version of the App · Uninstall Android System WebView Updates ·...
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
For me it was not working when
<Swiper>
's parent hadalignItems: 'center'
. It worked fine when I removed that property. If it’s relevant, the parent was an<ImageBackground>
element with the following styles:It worked fine when I changed the parent styles to this:
But it also worked when I just commented out the
alignItems
rule I had originally.TLDR: just remove
alignItems: 'center'
from the parent element.The only thing that seems to work is by wrapping the Swiper Component
<Swiper></Swiper>
withScrollView
instead ofView