Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/206.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何使工具栏与内容重叠_Android_Xml_Android Recyclerview_Toolbar - Fatal编程技术网

Android 如何使工具栏与内容重叠

Android 如何使工具栏与内容重叠,android,xml,android-recyclerview,toolbar,Android,Xml,Android Recyclerview,Toolbar,我在我的内容布局中尝试过类似“app:layou behavior=“@string/appbar\u scrolling\u view\u behavior”,但在我的情况下,我的内容布局的回收视图在工具栏中闪闪发光。我如何使工具栏完全覆盖其他内容?这是我的工具栏 <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar xmlns:android="http://schemas.and

我在我的
内容布局中尝试过类似
“app:layou behavior=“@string/appbar\u scrolling\u view\u behavior”
,但在我的情况下,我的内容布局的
回收视图在工具栏中闪闪发光。我如何使工具栏完全覆盖其他内容?

这是我的工具栏

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
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="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:id="@+id/logobar">

<ImageView
android:id="@+id/tv_header_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/logo"
android:layout_gravity="center"
/>

</android.support.v7.widget.Toolbar>

这是我的回收站布局

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2">
<!--android:background="@color/backgroundColor"-->



<include
    layout="@layout/logobar_layout"
    ></include>

<android.support.v7.widget.RecyclerView
    android:layout_marginTop="-100dp"
    android:clipToPadding="false"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/recyclerView"
   android:paddingBottom="?attr/actionBarSize"



>
    ></android.support.v7.widget.RecyclerView>


<include
    layout="@layout/toolbar_layout"
  ></include>


</RelativeLayout>

>

你尝试了什么。发布你的代码。你想要的也不清楚。我想要一件简单的事情。我的工具栏(logobar)覆盖了我的内容(recyclerview行)。你想让工具栏覆盖你的一行recyclerview吗?是的,没错。我用负边距做了一个糟糕的解决方案。但如果我能覆盖它,对我来说效果很好。我将非常感谢你的帮助:)