要使SlidingDrawer
透明,其android:background
屬性設置爲@null
。看下面的例子;
<SlidingDrawer android:id="@+id/slider"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:handle="@+id/handle" android:content="@+id/content"
android:background="@null">
...
...
</SlidingDrawer>
更新:
上面的代碼將使得整個抽屜透明。要使內容的唯一部分透明,你可以做這樣的事情;
<SlidingDrawer android:id="@+id/slider"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:handle="@+id/handle" android:content="@+id/content"
android:background="#eeffae" >
<ImageView android:id="@+id/handle" android:layout_width="55dp"
android:layout_height="55dp" android:src="@drawable/handle" />
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/content"
android:orientation="vertical" android:background="@null">
...
...
</LinearLayout>
</SlidingDrawer>
而且具有即時在'SlidingDrawer' 5'TextView'和'RelativeLayout'。該'RelativeLayout'它 – Hussain 2011-03-31 08:52:22