У меня есть набор из 10 изображений, которые нужно установить в верхней части экрана. В портретном режиме он идеален в соответствии с требованием. Но когда я поворачиваю ориентацию экрана к пейзажу, количество изображений остается таким же, но ширина не подходит для макета. Я имею в виду, что набор из 10 представлений изображений заполняет только 50% экрана.Набор изображений, не подходящих для ландшафтного режима
Я пытался по-разному, но все-таки я не могу сделать это для ландшафта
Вот мой XML сказать main.xml
<RelativeLayout android:id="@+id/relativeLayout1"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_alignParentTop="true"
android:id="@+id/progresslayout"
android:orientation="horizontal"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb1"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_alignParentLeft="true"></ImageView>
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb2"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></ImageView>
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb3"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></ImageView>
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb4"
android:layout_toRightOf="@+id/pb3" android:layout_height="wrap_content"
android:layout_width="wrap_content"></ImageView>
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb5"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></ImageView>
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb6"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></ImageView>
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb7"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></ImageView>
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb8"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></ImageView>
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb9"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></ImageView>
<ImageView android:src="@drawable/progressgreen" android:id="@+id/pb10"
android:layout_height="wrap_content"
android:layout_width="wrap_content"></ImageView>
</LinearLayout>
</RelativeLayout>
Я попытался дать андроида: layout_weight =»" свойство также, но все еще бесполезно. И интересно, что я заметил здесь вместо того, чтобы увидеть увеличенное изображение, если я пытаюсь то же самое с некоторой кнопки или редактирования текста, поданного, он прекрасно работает как в портретной и альбомной
ваша ширина LinearLayout и высота должна быть как андроида: layout_width = "fill_parent" андроид: layout_height = "fill_parent" –
@Padma Кумар, я пытался что – tejas