I'm making an app for my graduation exam.
I have a frame layout that has a black background with a 60% alpha (to shade everything that is below it). I would like that the frame layout overlaps the app bar layout and the floating button.
The only other similar question I found is this one, but It didn't work on my project because, as long as I understood, he only wanted to overlap a FrameLayout.
Here is the AppBarLayout with the floating button:
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
<RelativeLayout
android:id="@+id/header"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:elevation="4dp">
[...]
</RelativeLayout>
</android.support.design.widget.AppBarLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@drawable/ic_add_white" />
Inside the relative layout up above there is a little text I need.
Here is instead the FrameLayout:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blackBackground"
android:id="@+id/addJobFrame"
android:visibility="visible"
app:behavior_overlapTop="100dp">
[...]
</FrameLayout>
Please, note that everything is inside a CoordinatorLayout.
The effect I want to obtain is the one on the right in this picture, in fact in the frame layout I've included an external xml layout.
As an alternative, do you know any other method?