0
内viewpagerをカバーしている私のレイアウトです:TablayoutはCoordinatorLayoutここ
<?xml version="1.0" encoding="utf-8"?>
<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/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
app:elevation="2dp"
android:layout_height="wrap_content">
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/tab_layout_bg"
app:tabIndicatorColor="@color/tab_indicator_color"
app:tabGravity="fill"/>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
がviewpagerにパディングを追加するための唯一のソリューションですか?
tablayoutは画面の上部または下部にありますか?おそらくxmlのビューページの上に追加しようとします。それは私が私のプロジェクトから見つけることができる唯一の違いです、そして、私の作品:) – Vucko