Android Learning--horizontalscollview Horizontal scrolling controls

Source: Internet
Author: User

The Horizatalscollview control simply supports horizontal scrolling, and it can contain only one control, usually defined in a <HorizatalScollView> tag <LinearLayout>

Label and the Android:orientation property value in the <LinearLayout> tag is set to horization. Then place multiple controls in the <LinearLayout> tab if < The total width of the controls in the Linearlayout> label exceeds the width of the screen, and a scrolling effect occurs.

<linearlayout xmlns:android= "Http://schemas.android.com/apk/res/android"      Android:layout_width= "Match_parent"     android:layout_height= "Match_parent"      android:orientation= "Horizontal"    >    < Horizontalscrollview        android:layout_width= "Match_parent"          android:layout_height= "Match_parent"          android:id= "@+id/horizontalscrollview"          Android:fadingedge= "Horizontal"         android:layout_gravity= "Center_ Horizontal " >        <LinearLayout             android:layout_width= "Fill_parent"              android:layout_height= "Fill_parent"              android:orientation= "Horizontal"             >             <ImageView                 android:layout_width= "100DP"                  android:layout_ height= "100DP"                  android:src= "@drawable/userhead"                  />            <imageview                 android:layout _width= "100DP" &NBSP;&NBSP;&NBsp;             android:layout_height= "100DP "                android:src=" @drawable/userhead "                 />            <ImageView                 android:layout_width= " 100DP "                android: layout_height= "100DP"                  android:src= "@drawable/userhead"                  />             <ImageView                android:layout_width= " 100DP "                android: layout_height= "100DP"                  android:src= "@drawable/userhead"                  />             </linearlayout>        

As below, slide the picture around

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/12/wKioL1T1pdaTpGKtAAF0ZPeq6oA742.jpg "title=" Qq20150303110846.png "alt=" Wkiol1t1pdatpgktaaf0zpeq6oa742.jpg "/>

Android Learning--horizontalscollview Horizontal scrolling controls

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.