我有一個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