简体   繁体   中英

Dim/Blur Background When SlidingDrawer Is Open

I'm looking for a way to dim/blur background when the slidingdrawer is open but I couldn't find. Now, my question is, is it possible?

If I understood correctly you want to change the transparency of the area of the screen over which the sliding drawer is open.

You can try this if the above is correct.

 <SlidingDrawer
 android:id="@+id/drawer"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:handle="@+id/handle"
 android:content="@+id/content">

 <ImageView
     android:id="@id/handle"
     android:layout_width="88dip"
     android:layout_height="44dip" />

 <FrameLayout
     android:id="@id/content"
     android:layout_width="match_parent"
     android:layout_height="match_parent" 
     android:background="#AAFFFFFF" />

</SlidingDrawer>

By setting this, android:background="#AAFFFFFF" We are changing the transparency of the color white(FFFFFF).

I hope it helps..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM