I have a TabLayout and a ViewPager with scrolling behavior. 
In the ViewPager, there are two layouts: -

1. (RecyclerView + ProgressBar)
2. Google Map View

1) When the tab is at RecyclerView, the tabLayout will scroll/hide away when the Recycler view is scrolled. This part is working as expected.

2) However, when the tab is at the Google Map View, the whole view is shifted down.
the Zoom buttons and google copyright info is out of view. (See image below). When the scrolling behavior is commented off, the map is shown correctly, but recyclerView no longer hides the tablayout.

Is there a way to show the map correctly and at the same time allow the tablayout to be hidden when the recyclerview is displayed?

[![enter image description here](https://i.stack.imgur.com/xe6e0.png)](https://i.stack.imgur.com/xe6e0.png)

The following is the xml for the coordinatorLayout

```
<android.support.design.widget.CoordinatorLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v4.view.ViewPager
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" />

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:orientation="vertical">

        <android.support.design.widget.TabLayout
            android:id="@+id/tab_layout"
            style="@style/TabLayoutTheme"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:elevation="4dp"
            android:theme="@style/TabLayoutTheme"
            app:layout_scrollFlags="scroll|enterAlways"
            app:tabSelectedTextColor="@color/primary_text" />

    </android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>

```