Я пытаюсь понять, как работают макеты Android. У меня есть макет, который я хотел бы создать, но мне было очень трудно его создать. Я включил код для макета, а также изображение http://tinypic.com/r/33258hx/7, представляющее то, что я хотел бы создать.
Я боролся с приведенным ниже кодом компоновки, и я не настолько близок к получению того, что планировал. Может ли кто-нибудь предоставить мне предложения и / или рекомендации, которые могут помочь? Спасибо.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_gravity="center_vertical"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/image1"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@drawable/image1"
android:scaleType="fitXY">
</ImageView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:layout_gravity="center_vertical">
<ImageView
android:id="@+id/image2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/image2"
android:scaleType="fitXY">
</ImageView>
<ImageView
android:id="@+id/image3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/image3"
android:scaleType="fitXY">
</ImageView>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_gravity="bottom"
android:layout_height="wrap_content">
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:textSize="15sp"
android:text="text1"/>
<ImageView
android:id="@+id/imageText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ImageText1"
android:layout_above="@+id/text1"
android:scaleType="fitXY"/>
<ImageView
. . .
/>
<TextView
android:id="@+id/Text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/Text1"
android:layout_above="@+id/ImageText2"
android:text="Text2"
android:paddingLeft="70px"
android:textSize="50sp"/>
<View android:id="@+id/divider"
android:background="@drawable/black_white_gradient"
android:layout_width="fill_parent"
android:layout_above="@id/current_kw"
android:layout_height="1dp"/>
<TextView
android:id="@+id/Text3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="30px"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/ImageText3"
android:textSize="15sp"
android:text="Text3"/>
<TextView
android:id="@+id/Text4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="30px"
android:layout_above="@+id/ImageText4"
android:layout_toRightOf="@+id/Text3"
android:textSize="50sp"
android:text="Text4"/>
...
</RelativeLayout>
</LinearLayout>