0
我的問題與FrameLayout裏的FrameLayout干擾AppBarLayout
的FrameLayout風格干擾AppBarLayout
我想成爲下AppBarLayout
activity_main.xml中
<?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.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
android:layoutDirection="rtl"
app:tabGravity="fill"/>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.design.widget.CoordinatorLayout>
嘗試添加這行代碼你'FrameLayout'裏面:'應用:layout_behavior = 「@字符串/ appbar_scrolling_view_behavior」' – Yupi
固定謝謝你,只有新的問題的https://image.ibb。 co/jqv5Sv/Screenshot_2017_07_04_02_24_46.png – user8215914
這不是完整的XML。更新您的activity_main.xml整個xml代碼 – Yupi