2013年8月27日 星期二

設定透明顏色

XML:

   <ImageButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_toRightOf="@+id/addFecesDiarrheaButton"
    android:layout_alignBottom="@+id/addFecesCountLabel"
    android:src="@drawable/irregularity"
    android:background="@android:color/transparent"
    />

JAVA:


    addFoodButton.setBackgroundColor(Color.TRANSPARENT);



沒有留言:

張貼留言