У меня следующий пользовательский вид в галерее отлично работает. Я хотел бы, чтобы предыдущие/следующие изображения отображались влево/вправо. (предыдущее изображение рядом с левым полем и наоборот) с правильным изображением) Любые идеи?Как разместить изображения в LinearLayout?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<ImageView
android:id="@+id/gallery_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:layout_marginLeft="0dp"
android:src="@drawable/previous" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/fragment_gallery_item_imageview"
android:layout_width="40dp"
android:layout_height="40dp" />
<TextView
android:id="@+id/fragment_gallery_item_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="New Text"
android:textSize="20sp" />
</LinearLayout>
<ImageView
android:id="@+id/gallery_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_marginRight="0dp"
android:src="@drawable/next" />
</LinearLayout>
спасибо.
Вы можете использовать layoutWeight = "1" для обоих imageViews и LinearLayout внутри – Opiatefuchs