React-native-swiper: height setting does not work

Created on 26 Jan 2018  路  7Comments  路  Source: leecade/react-native-swiper

height setting does not work

Swiper used default flex:1 ORZ...
image

Version

{
  "name": "Cadaily",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.2.0",
    "react-native": "0.52.1",
    "react-native-swiper": "^1.5.13",
    "react-native-viewpager": "^0.2.13",
    "react-navigation": "^1.0.0-beta.27"
  },
  "devDependencies": {
    "babel-jest": "22.1.0",
    "babel-preset-react-native": "4.0.0",
    "jest": "22.1.4",
    "react-test-renderer": "16.2.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

guess

Maybe it doesn't work in react-navigation TabNavigator? I puted it into a tab

Most helpful comment

I solved this by adding a container to Swiper and give the container a height.It works锛氾級

All 7 comments

I solved this by adding a container to Swiper and give the container a height.It works锛氾級

Although this can be done on the iphone, but not on Android phones.

remark, the same problem with you in android

@honestxll have you resolved this problem in android?

@panmin Yes,give the<Swiper /> a container also worked in android. I closed react-navigation TabNavigator's propety animationEnabled, it works!

Same thing happened to me in react-navigation tab... :/ I will use your fix for now, thanks guys!

yeah! view wrapper then setting height

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Liqiankun picture Liqiankun  路  3Comments

AndriiBoiko picture AndriiBoiko  路  3Comments

kylehagler picture kylehagler  路  3Comments

wrannaman picture wrannaman  路  3Comments

itinance picture itinance  路  3Comments