4

Im currently 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...

Hussain
  • 5,552
  • 4
  • 40
  • 50
  • Additionally im having 5 `TextView` and `RelativeLayout` in the `SlidingDrawer`.. The `RelativeLayout` consists of `EditText` and a `Button` in it – Hussain Mar 31 '11 at 08:52

1 Answers1

8

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>
Mudassir
  • 13,031
  • 8
  • 59
  • 87
  • Thanks mudassir... Its working now.. I have another doubt tat can i make the `SlidingDrawer` to slide for half screen of my activity.. – Hussain Mar 31 '11 at 09:08
  • Sorry buddy, I didn't find anything about that yet. But see the updated answer above, may be that is useful for you. – Mudassir Mar 31 '11 at 09:17
  • Thanks mudassir.. It will help me a lot... and thanks for ur up vote :) – Hussain Mar 31 '11 at 09:19