<HorizontalScrollView
android:id="@+id/hsv"
android:layout_width="fill_parent"
android:layout_height="150sp"
android:layout_alignParentTop="true"
android:fillViewport="true"
android:measureAllChildren="false"
android:scrollbars="none"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="130sp"
android:orientation="horizontal"
android:layout_margin="10sp"
android:gravity="center|left"
>
<ImageView
android:id="@+id/imageview1"
android:layout_width="100sp"
android:layout_height="100sp"
android:src="@drawable/uploadepic"
android:layout_margin="5sp"
android:visibility="gone"
/>
<ImageView
android:id="@+id/image1"
android:layout_width="120sp"
android:layout_height="100sp"
android:visibility="gone"
android:layout_margin="5sp"
android:scaleType="centerCrop"
/>
<ImageView
android:id="@+id/image2"
android:layout_width="120sp"
android:layout_height="100sp"
android:visibility="gone"
android:layout_margin="5sp"
android:scaleType="centerCrop"
/>
<ImageView
android:id="@+id/image3"
android:layout_width="120sp"
android:layout_height="100sp"
android:visibility="gone"
android:layout_margin="5sp"
android:scaleType="centerCrop"
/>
<ImageView
android:id="@+id/image4"
android:layout_width="120sp"
android:layout_height="100sp"
android:visibility="gone"
android:layout_margin="5sp"
android:scaleType="centerCrop"
/>
<ImageView
android:id="@+id/image5"
android:layout_width="120sp"
android:layout_height="100sp"
android:visibility="gone"
android:layout_marginLeft="5sp"
android:layout_marginTop="5sp"
android:layout_marginBottom="5sp"
android:layout_marginRight="20sp"
android:scaleType="centerCrop"
/>
</LinearLayout>
</HorizontalScrollView>
Sie können benutzerdefinierte Ansicht von Horizontal Listview verwenden. –
Sie können diesen Link überprüfen: [http://sandyandroidtutorials.blogspot.in/2013/06/horizontontal-listview-tutorial.html] (http://sandyandroidtutorials.blogspot.in/2013/06/horizontal-listview-tutorial) .html) –
Ich habe diesen Link schon ausprobiert. Aber es funktioniert nicht – Yamuna