我目前有以下布局(见下文)。现在我遇到的问题是我需要图标来填满屏幕(所以我需要将屏幕分成 6 个块。但最大的问题是我的图像正在拉伸,看起来真的很糟糕。所有的图像是 256X256。我该怎么做才能在上方或下方拥有更多空间而不是让它们拉伸?
布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.60"
android:orientation="horizontal"
android:weightSum="3" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
<ImageButton
android:id="@+id/category_menu_button_food"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@drawable/menu_icon"
android:contentDescription="Food Menu"
android:onClick="foodMenuItemClicked"
android:scaleType="centerInside" />
<TextView
android:id="@+id/category_menu_label_food"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.1"
android:ems="20"
android:gravity="center"
android:text="Menu"
android:textSize="25sp" >
<requestFocus />
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
<ImageButton
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@drawable/search_icon"
android:contentDescription="Drinks Menu"
android:onClick="searchMenuItemClicked"
android:paddingTop="55dp"
android:scaleType="centerInside" />
<TextView
android:id="@+id/category_menu_label_food"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.1"
android:ems="20"
android:gravity="center"
android:text="Search"
android:textSize="25sp" >
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
<ImageButton
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@drawable/cart_icon"
android:contentDescription="Favorites"
android:onClick="favoritesMenuItemClicked"
android:scaleType="centerInside" />
<TextView
android:id="@+id/category_menu_label_food"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.1"
android:ems="20"
android:gravity="center"
android:text="Cart"
android:textSize="25sp" >
</TextView>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.60"
android:orientation="horizontal"
android:weightSum="3" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
<ImageButton
android:id="@+id/button4"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="10dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@drawable/bill_icon"
android:contentDescription="View Bill"
android:onClick="billMenuItemClicked"
android:scaleType="centerInside" />
<TextView
android:id="@+id/category_menu_label_food"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.1"
android:ems="20"
android:gravity="center"
android:text="Bill"
android:textSize="25sp" >
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
<ImageButton
android:id="@+id/activity_category_menu_button_callWaiter"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@drawable/callwaiter_icon"
android:contentDescription="Call Waiter"
android:onClick="callWaiterButtonClicked"
android:scaleType="centerInside" />
<TextView
android:id="@+id/category_menu_label_food"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.1"
android:ems="20"
android:gravity="center"
android:text="Call Waiter"
android:textSize="25sp" >
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
<ImageButton
android:id="@+id/button6"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="10dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@drawable/exit_icon"
android:contentDescription="Exit App"
android:onClick="exitButtonClicked"
android:scaleType="centerInside" />
<TextView
android:id="@+id/category_menu_label_food"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.1"
android:ems="20"
android:gravity="center"
android:text="Exit App"
android:textSize="25sp" >
</TextView>
</LinearLayout>
</LinearLayout>
<Space
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Space
android:layout_width="match_parent"
android:layout_height="wrap_content" />