I'm having a UI problem I've been trying to fix for the past day. To make my TabLayout transparent I need to move it outside the AppBar Layout and when I do so, it becomes transparent all right, but it overlaps the toolbar in the process. like so (please refer to the image):
Here's my layout:
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:pp="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<!-- app_bar height @dimen/detail_backdrop_height -->
<android.support.design.widget.AppBarLayout
    android:id="@+id/app_bar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    android:fitsSystemWindows="true">
    <android.support.design.widget.CollapsingToolbarLayout
        android:id="@+id/collapse_toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true"
        app:layout_scrollFlags="scroll|exitUntilCollapsed"
        app:contentScrim="@color/colorPrimary"
        app:expandedTitleMarginTop="120dp"
        app:expandedTitleGravity="center|bottom"
        app:expandedTitleTextAppearance="@style/TransparentText">
        <ImageView
            android:id="@+id/backdrop"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            android:alpha="0.4"
            app:layout_collapseMode="parallax" />
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_collapseMode="parallax"
            app:layout_anchor="@+id/app_bar">
            <de.hdodenhof.circleimageview.CircleImageView
                android:id="@+id/cover_image"
                android:layout_width="90dp"
                android:layout_height="90dp"
                android:layout_alignParentTop="true"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="50dp"
                app:civ_border_color="@android:color/black"
                app:civ_border_width="1dp" />
            <LinearLayout
                android:id="@+id/header_text_layout"
                android:layout_below="@id/cover_image"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">
                <TextView
                    android:id="@+id/game_title"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:text="Game title"
                    android:gravity="center"
                    android:textColor="@android:color/white"
                    android:textSize="24sp"/>
                <TextView
                    android:id="@+id/developer_txt"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:text="Developer"
                    android:gravity="center"
                    android:textColor="@android:color/white"
                    android:textSize="14sp"/>
                <TextView
                    android:id="@+id/publisher_txt"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:text="Publisher"
                    android:gravity="center"
                    android:textColor="@android:color/white"
                    android:textSize="14sp"/>
            </LinearLayout>
        </RelativeLayout>
        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?android:attr/actionBarSize"
            app:layout_collapseMode="pin" />
    </android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.design.widget.TabLayout
    android:id="@+id/tab_layout"
    android:layout_width="match_parent"
    android:layout_height="?android:attr/actionBarSize"
    android:background="@android:color/transparent"
    app:layout_scrollFlags="scroll|enterAlways"
    app:tabGravity="fill"
    app:tabMode="fixed"/>
<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior">
    <android.support.v4.view.ViewPager
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
What I want is a transparent tablayout below my app bar. thank you!
