I was wondering how to add a gray overlay to everything inside of a layout file in order to see everything inside the layout, but with this gray transparent overlay on.
I tried to make a
One of the ways you can achieve the effect is by using a
<FrameLayout> container as your root. Within it you can add your current layout and the view with a background together. Here, the
view should cover the entire screen. So, your layout will look something like:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- Your current layout here --> <!-- View to cover your screen --> <View android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/black" /> </FrameLayout>