Android rendering children of View as separate pages · Issue #186 · callstack/react-native-pager-view (original) (raw)
Summary
On Android, all children of children elements get rendered onto their own pages.
Environment info
info Fetching system and libraries information...
System:
OS: macOS 10.15.5
CPU: (16) x64 AMD Ryzen 7 1700X Eight-Core Processor
Memory: 166.43 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
Yarn: 1.22.4 - ~/.nvm/versions/node/v12.18.0/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v12.18.0/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
IDEs:
Xcode: 11.5/11E608c - /usr/bin/xcodebuild
npmPackages:
react: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz => 0.61.4
Library version: Expo 37.0.0
Steps to reproduce
import ViewPager from "@react-native-community/viewpager" import React from "react" import { View, Text } from "react-native"
export const MyComponent = () => { return ( First page a First page b Second page a Second page b ) }
Renders incorrectly on Android. I have 4 screens here that I can swipe through, but I expect only 2 screens with text underneath.
Renders correctly on iOS, with the Text being underneath each other.