Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@ldn0x7dc/react-native-view-pager
Advanced tools
A ListView backed ViewPager component for react-native apps. More flexible than ViewPagerAndroid.
Readme
A ListView backed ViewPager component for react-native apps. More flexible than ViewPagerAndroid.
npm install --save @ldn0x7dc/react-native-view-pager
The private scope @ldn0x7dc
exists because this name has already been taken.
Have a glance at first.
import ViewPager from '@ldn0x7dc/react-native-view-pager';
...
render() {
return (
<ViewPager
style={{flex: 1}}
renderPage={(pageData, pageId, layout) => {}}
pageDataArray={['your', 'data', 'array']}
/>
);
}
Most of the props mimics those of ViewPagerAndroid. But differences exist.
renderPage
: function
(pageData, pageId, layout) => renderable
For your convenience, The layout object ({width, height}) contains the width and height of this ViewPager. The renderable returned here will be overridden with ViewPager's width and height.
pageDataArray
: array
Custom data array of your pages. Each array item will be passed to renderPage(pageData, pageId, layout)
as the first argument.
initialPage
: number
Index of initial page that should be selected. Use setPage
method to update the page, and onPageSelected
to monitor page changes
onPageScroll
: function
(event) => {}.
The event object will carry following data:
onPageScrollStateChanged
: function
(state) => {}.
Called when the page scrolling state has changed. The page scrolling state can be in 3 states: -
onPageSelected
: function
(page) => {}.
Called with the index of page that has been selected.
pageMargin
: number
Blank space to show between pages.
scrollEnabled
: bool
When false, the content does not scroll. The default value is true.
setPage(page, immediate)
A helper function to scroll to a specific page in the ViewPager. The transition between pages will be animated if immediate
is not provided or false.
FAQs
A ListView backed ViewPager component for react-native apps. More flexible than ViewPagerAndroid.
We found that @ldn0x7dc/react-native-view-pager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).