i want to create a horizontal scroll view just like the one shown in image
In android widgets i found Horizontal Scroll View widget in composite section but dont know how to use it.Please help
i want to create a horizontal scroll view just like the one shown in image
In android widgets i found Horizontal Scroll View widget in composite section but dont know how to use it.Please help
首先创建xml file
并添加,HorizontalScrollView
然后将一个布局作为子项添加到此。然后你可以添加任何没有。对新添加的孩子的看法,这使得整个事情scroll
。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<!-- child views here -->
</RelativeLayout>
</HorizontalScrollView>
</LinearLayout>