I have my toolbar on top of an imageview that takes up the whole screen and I would like for the toolbar to appear like its on top of the image and with the transparent effect something like
But i dont know how to acheive that effect and my google searches havent been successful
This is my code:
<ImageView
android:id="@+id/background"
android:scaleType="fitXY"
android:alpha="0.7"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentTop="true"
android:elevation="6dp"
android:alpha="0.5"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_below="@+id/toolbar"
android:elevation="6dp"
android:theme="@style/ThemeOverlay.AppCompat.Light"
app:tabSelectedTextColor="@android:color/white"
app:tabTextColor="@android:color/darker_gray"/>
Im using a constraint layout.
If someone could tell me how to do it or point me in the right direction I would appreciate it.
Thanks