0

如何在较小/中型屏幕上不将底行图像切成两半?

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" 
android:background="@drawable/wood1"
android:id="@+id/mainll"
>

 <LinearLayout
     android:id="@+id/linearad"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:layout_gravity="center_horizontal"
     android:background="@drawable/shade"
     android:gravity="center_horizontal"
     android:orientation="horizontal" >

</LinearLayout>

 <LinearLayout
     android:id="@+id/toprow"
     android:layout_width="fill_parent"
     android:layout_height="10dp"
     android:layout_marginTop="1dp"
     android:layout_marginBottom="1dp"
     android:layout_weight="1"
     android:orientation="horizontal" >

    <Button
        android:id="@+id/timeline"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />
</LinearLayout>



<LinearLayout
    android:id="@+id/row1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:orientation="horizontal"
 >

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button3"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button4"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button5"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />
</LinearLayout>

<LinearLayout
    android:id="@+id/row2"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:orientation="horizontal"


 >

    <Button
        android:id="@+id/button6"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button7"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button8"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />


    <Button
        android:id="@+id/button9"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button10"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />
</LinearLayout>

<LinearLayout
    android:id="@+id/row3"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:orientation="horizontal"
 >

    <Button
        android:id="@+id/button11"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button12"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button13"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />


    <Button
        android:id="@+id/button14"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button15"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />
</LinearLayout>

<LinearLayout
    android:id="@+id/row4"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:orientation="horizontal"


     >

    <Button
        android:id="@+id/button16"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button17"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button18"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />


    <Button
        android:id="@+id/button19"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button20"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />
</LinearLayout>

<LinearLayout
    android:id="@+id/row5"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:orientation="horizontal"
    >

    <Button
        android:id="@+id/button21"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button22"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button23"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />


    <Button
        android:id="@+id/button24"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button25"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />
</LinearLayout>

<LinearLayout
    android:id="@+id/row6"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:orientation="horizontal"
     >

    <Button
        android:id="@+id/button26"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button27"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button28"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button29"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button30"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />
</LinearLayout>


<LinearLayout
    android:id="@+id/row7"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:orientation="horizontal"
     >

    <Button
        android:id="@+id/button31"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button32"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button33"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button34"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/button35"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

</LinearLayout>

 <LinearLayout
    android:id="@+id/bottomrow"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:orientation="horizontal"
     >

    <Button
        android:id="@+id/bl"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/findme"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />

    <Button
        android:id="@+id/buttonbr"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="2dp"
        android:layout_weight="1"
        android:background="@drawable/an1" />
</LinearLayout>

</LinearLayout>

底部线性布局在屏幕外被减半

4

1 回答 1

0

我需要将行的高度编辑为“0dp”

于 2013-07-19T14:44:46.480 回答