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