我正在尝试解决这个问题,但它不起作用我搜索了很多,并没有发现这样的问题,这张图片Image看到红线如何出国xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 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:id="@+id/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:fitsSystemWindows="true"
android:focusableInTouchMode="true"
android:layoutDirection="ltr"
tools:context=".Home">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<include layout="@layout/toolbar_home" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs_home"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabIndicatorColor="#ffffff"
app:tabMode="scrollable"
app:tabSelectedTextColor="#ffffff"
app:tabTextColor="#64ffffff">
<android.support.design.widget.TabItem
android:id="@+id/tabItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Categories" />
<android.support.design.widget.TabItem
android:id="@+id/tabItem2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="NEW POSTS" />
<android.support.design.widget.TabItem
android:id="@+id/tabItem3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stats" />
</android.support.design.widget.TabLayout>
</android.support.design.widget.AppBarLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior" >
<android.support.v4.view.ViewPager
android:id="@+id/viewPagerHome"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#beffffff"
android:orientation="vertical">
<ImageView
android:id="@+id/img_cover_header"
android:layout_width="match_parent"
android:layout_height="150dp"
android:scaleType="centerCrop"
android:src="@drawable/cover_header" />
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
工具栏
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/toolbar_home"
android:layout_height="55dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:layout_scrollFlags="scroll|enterAlways|snap"
android:layoutDirection="ltr"
android:background="?attr/colorPrimary">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="17dp"
android:text="My World"
android:gravity="center"
android:layout_gravity="center"
android:textColor="#ffffff" />
<View
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"/>
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginRight="10dp"
android:layout_gravity="center"
android:src="@drawable/share_icon"
android:background="?attr/selectableItemBackground"
android:clickable="true"/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
一切正常,但没有显示所有内容
对不起,但我的语言不好,我希望得到一些帮助来解决这个问题,非常感谢和最诚挚的问候
如果您希望LinearLayout不再占用屏幕,请尝试从LinearLayout中删除此行app:layout_behavior="@string/appbar_scrolling_view_behavior"