callstack / callstack/react-native-pager-view

could it possible that ViewPager do not need to set a style with a specific height?

Open
#154 4 comments 6 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
3.4k
Forks
476
Avg merge
10d 21h
Merged PRs (30d)
2

Description

# Question
the example in `readme` provide a `style={{ flex: 1 }}` to `ViewPager`(like bellow),and it occupy all screen height; but in my case, the pager's height is not specific,it depends; but without a specific height, `ViewPager` show nothing

so, could the height of `ViewPager` be flexible ?
```
import React from 'react';
import {StyleSheet, View, Text} from 'react-native';
import ViewPager from '@react-native-community/viewpager';

const MyPager = () => {
return (


First page


Second page


);
};

const styles = StyleSheet.create({
viewPager: {
flex: 1,
},
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.