Я пытаюсь получить макет, который будет иметь ImageView
привязывается к верхней, ImageView
прикрепляется к нижним и LinearLayout
, который заполняет среднегоандроид ImageView сверху и снизу
LinearLayout
(или я могу хотеть использовать ScrollView
) необходимо расширить, чтобы заполнить пространство в зависимости от разрешения, размера экрана и т.д ...
Я попытался комбинации fill_parent
, wrap_content
и т. Д., Но не могут быть привязаны к основанию
Любые идеи?
EDIT: Компоновка код
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/background2"
android:background="#EEEDEB"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="174px"
android:src="@drawable/sodexotop" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:background="#ffffff"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp">
<Button
android:id="@+id/button4"
android:layout_width="420px"
android:layout_height="99px"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:background="@drawable/butt1"
android:onClick="clk_raynes"
android:text="sitebutton"
android:layout_marginTop="10dp"
android:textColor="#000000"
android:textSize="50px" />
<Button
android:id="@+id/rutlishbtn"
android:layout_width="420px"
android:layout_height="99px"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:layout_marginTop="6dp"
android:background="@drawable/butt1"
android:onClick="clk_rutlish"
android:text="Site2"
android:textColor="#000000"
android:textSize="50px" />
<Button
android:id="@+id/harrisbtn"
android:layout_width="420px"
android:layout_height="99px"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:layout_marginTop="6dp"
android:background="@drawable/butt1"
android:onClick="clk_harris"
android:text="Site3"
android:textColor="#000000"
android:textSize="50px" />
<Button
android:id="@+id/button3"
android:layout_width="420px"
android:layout_height="99px"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:layout_marginTop="6dp"
android:background="@drawable/butt1"
android:onClick="clk_ricards"
android:text="Site4"
android:textColor="#000000"
android:textSize="50px" />
<Button
android:id="@+id/button10"
android:layout_width="420px"
android:layout_height="99px"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:layout_marginTop="6dp"
android:background="@drawable/butt1"
android:onClick="clk_btn10"
android:text="Site5"
android:textColor="#000000"
android:textSize="50px" />
<Button
android:id="@+id/button11"
android:layout_width="420px"
android:layout_height="99px"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:layout_marginTop="6dp"
android:background="@drawable/butt1"
android:onClick="clk_btn11"
android:text="Site6"
android:textColor="#000000"
android:textSize="50px" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>
<Button
android:id="@+id/picbtn3"
android:layout_marginTop="6dp"
android:layout_marginBottom="190px"
android:text="³"
android:textColor="#000000"
android:textSize="30sp"
android:layout_width="60dp"
android:layout_height="60dp"
android:background="@drawable/butt1"
android:onClick="qrbtn" />
</LinearLayout>
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="174px"
android:src="@drawable/sodexobottom" />
</LinearLayout>
разместить свой код макета –
пожалуйста, добавьте свой код, чтобы мы могли помочь вам –
Вероятно, это поможет [заливку в LinearLayout] (http://stackoverflow.com/questions/5880513/how-to-make -a-linearlayout-fill-still-space-in-a-relativelayout) – Apoorv