我有一个clasical Android的问题,布提解决不了。ImageButton的高度和宽度
我有一个ImageButton的,但它变形,高度大于它应该是,这是代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical" >
<!-- other content -->
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageButton
android:id="@+id/sabadell_but"
android:background="@drawable/banner_sabadell"
android:contentDescription="@string/infoDesc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
</LinearLayout>
</LinearLayout>
这是我应该看到:
这是我所看到的:
我该如何解决这个问题?
我需要它作为背景,因为如果不是这样,我看到的是一个图像的按钮,就它存在另一种方式来避免这种影响? – user1256477 2013-04-30 08:10:09
在回答.. – Alex 2013-04-30 08:14:03
9补丁。好主意 – 2013-04-30 08:14:24