开发者

how to make SlidingDrawer transparent

Im cur开发者_运维技巧rently trying to add the SlidingDrawer in my application.. My activity consists GridView and the SlidingDrawer will be coming from bottom to top.. Now my problem is i need to make the SlidingDrawer as transparent and also move my GridView to top to some extent.. Is this possible to make.. Im new to android.. help me out with this...

If moving the GridView is not an good idea then i want the SlidingDrawer to come above the GridView and make it as a transparent so tat my GridView is visible

Thanks...


To make the SlidingDrawer transparent, set its android:background attribute to @null. See the following example;

<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>

Update:

Above code will make the whole drawer transparent. To make the only the content part, transparent, you can do something like this;

<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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜