У меня есть tablayout и viewpager внутри фрагмента. У меня есть две вкладки в моем tablayout. и панель инструментов в моем app_bar_main.xml. но при запуске приложения tablayout скрывает панель инструментов. как его можно разместить после панели инструментов? вот мой код это мой app_bar_main.xml файлКак разместить вкладку после панели инструментов?
<?xml version="1.0" encoding="utf-8"?>
<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="#CC0000"
android:titleTextColor="@color/white"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/fragment_containerlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF"></FrameLayout>
это мой дизайн фрагмента, где я поместил вкладку расположение и вид пейджер
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.nayab.demotask.ContactsFragment"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.design.widget.TabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/contactstablayot"
android:layout_gravity="left|top"
android:background="#000000"
app:tabTextColor="@android:color/white"
/>
<android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/fragviewpager"
android:layout_gravity="left|center_vertical"
android:layout_marginTop="30dp"
android:background="#e6f1f5"
/>
может кто-нибудь пожалуйста, помогите мне
что вы пытаетесь достичь здесь? просто один экран с панелью инструментов наверху и tablayout под ним? – HourGlass