我在Android App中使用TabLayout和ViewPager。我想在TabLayout的右侧设置菜单按钮。
Xml
<LinearLayout 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:orientation="vertical">
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?actionBarSize"
app:tabGravity="fill"
app:tabIndicatorColor="@color/blue"
app:tabSelectedTextColor="@color/blue"
app:tabIndicatorHeight="4dp"
app:tabBackground="@color/Black"
app:tabMode="fixed">
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/Low">
</android.support.v4.view.ViewPager>
</LinearLayout>