5

I am trying to create a full screen translucent overlay which is shown in response to clicking a Floating action button, similar to Google Keep.enter image description here (Notice that it extends full screen, the status icons are highlighted and the floating action buttons are highlighted and the z-index of overlay is below the floating action buttons). I tried using the approach listed at https://stackoverflow.com/a/10107525/478028 -- However, once the overlay is showed, it masks even the floating action buttons and takes the clicks. Has anyone tried this before and pls share how this can be done? Thanks.

Community
  • 1
  • 1
vine'th
  • 4,890
  • 2
  • 27
  • 27

1 Answers1

0

Updated Answer: To create a translucent overlay effect, we can use the following style on a Activity:

<style name="BottomSheet" parent="Base.BottomSheet">
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:backgroundDimEnabled">true</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="bottomSheetBackground">@color/bs_background_dark</item>
</style>
vine'th
  • 4,890
  • 2
  • 27
  • 27