0
私のアプリケーションでは、各タブに独自のフラグメントがあるTabLayoutがあります。しかし、TabLayoutがフラグメントの一番下に重なっているので、私は自分のフラグメントの完全な内容を見ることができません。どうすれば問題を解決できますか?TabLayoutはViewPagerフラグメントと重複します
activity_main.xml
<RelativeLayout
android:id="@+id/main_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activitys.MainActivity">
<de.fhbielefeld.cardash.cardash.NonSwipeableViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
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/colorPrimary"
app:tabMode="fixed"
app:tabGravity="fill"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
fragment.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.skobbler.ngx.map.SKMapViewHolder
android:id="@+id/map_surface_holder"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_media_pause"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
これは、http://www.gadgetsaint.com/android/create-viewpager-tabs-android/#.WPuppVN97BIに役立つかもしれません。 – ASP