I have an issue about a Fragment this is hidden by ViewPager. I know the fragment is there behind since i experimented setting the ViewPager height to a fixed amount of pixels. Then it shows up i its container right below the viewpager. But What I want is the viewpager to cover all the screen and the when a user clicks on a button in the toolbar the fragment should appear ontop of all other views - that is the viewpager.
So my question - how could I make the Fragment to be shown on top of all other views?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/linlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<include layout="@layout/toolbar"/>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#4f83cc"
style="@style/MyCustomTabLayout"
app:tabMode="scrollable"
>
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_below="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<FrameLayout
android:id="@+id/container"
android:layout_width="200dp"
android:layout_height="200dp"
android:elevation="10dp"
android:translationZ="5dp"
>
</FrameLayout>
</LinearLayout>