繁体   English   中英

如何使我的工具栏与内容重叠

[英]How to make my toolbar overlap the content

我曾在content layout尝试过类似"app:layout_behavior="@string/appbar_scrolling_view_behavior"的事情,但就我而言,我的内容布局的recyclerview贯穿了工具栏,如何使工具栏完全覆盖其他内容?

这是我的工具栏

<?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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM