I want to show ImageView side-by-side in HorizontalScrollView like android markets. I'm having problem with the space taking by ImageView' inside theLinearLayout`, here what I'm getting: images separated by long uncontrolled spaces.
I want it to be like this:
Here the xml code for this row:
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="250dp"
android:background="#afafafaf" >
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout android:id="@+id/_linearLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<ImageView android:id="@+id/_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="#000000"
android:src="@drawable/icon_2"
/>
<ImageView android:id="@+id/_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="#000000"
android:src="@drawable/icon_2"
/>
</LinearLayout>
</HorizontalScrollView>
</TableRow>
No comments:
Post a Comment