我的haha.xml
布局被android.support.design.widget.AppBarLayout
覆盖,我怎样才能让haha.xml
上的按钮出现在AppBarLayout下? LinearLayout被AppBarLayout覆盖
仅haha.xml布局
PS: 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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.example.william.test.MainActivity"
tools:showIn="@layout/activity_main">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/haha" />
</android.support.design.widget.CoordinatorLayout>
haha.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/red">
<Button
android:layout_width="match_parent"
android:layout_height="100dp"
android:text="按钮不可用1"/>
</LinearLayout>
你周围似乎没有围绕AppBarLayout + LinearLayout的布局 –
@ cricket_007更新了activity_main.xml包含的全部内容。 –