Here is an example :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/myText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:id="@+id/imageList"
android:layout_below="@+id/myText"
android:layout_height="match_parent"
android:layout_width="match_parent">
<!-- Here come ImageViews -->
</LinearLayout>
</RelativeLayout>
I dynamically add ImageViews to the LinearLayout, but when there are too much images, there's no return to a new line.
- Is that even possible with a LinearLayout ? (with weight, orientation...)
- If not, what architecture should I make for this ?
Here is the ImageView I inflate to the LinearLayout :
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/image"
android:layout_width="60dp"
android:layout_height="60dp" />