Я новичок в разработке приложений для Android и реализовал SlidingTabLayout. Я хочу отобразить плавающую кнопку на одной из вкладок, но не могу этого сделать. Я попытался включить свою кнопку во фрагмент вкладки, а также в свое основное действие. В основной деятельности, когда я переключаю вкладки, кнопки по-прежнему включены во вторую вкладку. Я попробовал floatbutton.show() и скрылся в прослушивателе смены вкладок, но бесполезно. Будем признательны за любую помощь. Моя активность_main.xml
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawerlayout" android:layout_height="match_parent"
android:layout_width="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.pegasus.tabstutorial.MainActivity">
<include
android:id="@+id/app_bar"
layout="@layout/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<com.pegasus.tabstutorial.SlidingTabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/primaryColor" />
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:src="@mipmap/ic_launcher"
app:layout_anchor="@+id/appbarLayout"
app:layout_anchorGravity="bottom|right|end"
android:layout_marginBottom="37dp"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
<fragment
android:layout_width="280dp"
android:layout_height="wrap_content"
tools:layout="@layout/fragment_navigation_drawer"
android:id="@+id/navDrawer"
android:layout_gravity="start"/>
</android.support.v4.widget.DrawerLayout>`
и мой home_tab.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="You Are In Tab Home Tab"
android:id="@+id/textView"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>