2011-07-19 48 views

回答

0

如果你使用Android:背景,並把照片像這個按鈕在繪圖資源,您將可以使其例如:

android:background="@drawable/my_button" 
0

可以使高更和寬度小於方式按鈕的大小將拿出你想要的方式,爲「好」的東西,您將不得不將其創建爲背景圖像。

2
<?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"> 
    <Button android:text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="fill_parent"></Button> 
</LinearLayout> 

使用fill_parent作爲layout_height。對於OK,你可以使它在O下面K,但是像圖片一樣必須使用背景圖片。