2011-07-14 26 views
0

我試着複製幾個不同的例子,使用形狀佈局,試過的圖像等等。不管我做什麼,它都是一個雖然背景繪製被忽略。我故意把錯誤變成提拉XML,以確保它被看到,觸發一個錯誤。我有我在res /可繪製可繪製的東西。android:background =「@ drawable/XXXX在main.xml中按鈕被忽略

任何想法?

<Button android:id="@+id/buttonClose" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Test"`enter code here` 
    android:padding="5dip" 
    android:layout_gravity="center" 
    android:layout_alignParentBottom="true" 
    android:onClick="closeScoreBoard" 
    android:background="@drawable/button_close" 
    /> 


<?xml version="1.0" encoding="UTF-8"?> 
<shape  xmlns:android="http://schemas.android.com/apk/res/android" 
    android:shape="oval"> 

    <solid android:color="#FF0000"/> 

    <corners 
     android:bottomRightRadius="8dip" 
     android:bottomLeftRadius="8dip" 
     android:topLeftRadius="8dip" 
     android:topRightRadius="8dip" 
/> 
</shape> 
+0

您可以發佈您的XML按鈕嗎? –

+0

發佈更多詳細信息。 –

+0

請將它們添加到您的問題中,並將其格式化以便於閱讀。 –

回答