React native ScrollView

Source: Internet
Author: User

ScrollViewis a generic scrollable container where you can put multiple components and views, and these components do not need to be of the same type. ScrollView not only scrolls vertically, but also scrolls horizontally ( horizontal set by properties).

Import React, {Component} from ' React '; import{appregistry, ScrollView, Image, Text, View} from ' React-native ' class ISc Rolleddownandwhathappenednextshockedme extends Component {render () {return (<Scrollview><Textstyle={{Fontsize:96}}>scroll me plz</Text><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><Textstyle={{Fontsize:96}}>if</Text><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><Textstyle={{fontsize:96}}>scrolling down</Text><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><Textstyle={{Fontsize:96}}>what ' s the best</Text><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><Textstyle={{fontsize:96}}>framework around?}</Text><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><ImageSource={Require ('./img/Favicon.png ')}/><Imagesource={require (' <image source={require (' <text style={{fontsize:80}}>react Native</text> </ scrollview>); }}//Registration Application (registercomponent) to render correctly//NOTE: Only the application is registered once as a whole, not each component/module is registered appregistry.registercomponent (' Iscrolleddownandwhathappenednextshockedme ', () = Iscrolleddownandwhathappenednextshockedme);      

ScrollViewSuitable for displaying a very large number of scrolling elements. ScollViewall components placed in will be rendered, even if some components are extruded out of the screen because the content is too long. If you need to display a longer scrolling list, you should use components that are similar in functionality but better in performance ListView . Let's take a look at how to use the ListView.

React native ScrollView

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.