我遇到了Android ImageButton的問題。 我的圖標在頂部被切斷。Android ImageButton削減圖標頂部
代碼如下:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:layout_marginBottom="20sp"
android:paddingLeft="20sp"
android:paddingRight="20sp" >
<TextView
android:id="@+id/registration_1_button_sex_male_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/registration_1_male"
android:textColor="#fff"
android:textSize="15sp"
android:typeface="monospace" />
<ImageButton
android:id="@+id/registration_1_button_sex_male"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:paddingRight="20sp"
android:src="@drawable/icon_male_blue" />
</LinearLayout>
我已經試過這我GOOGLE了,但沒有人幫助一些黑客。
我也試圖在LinearLayout和ImageButton裏面添加填充,但沒有幫助,我嘗試給圖標和LinearLayout一個固定的高度,但沒有任何工作。 – kjurkovic 2012-03-14 09:42:38
你可以發佈圖像? – Tony 2012-03-14 10:29:57