【发布时间】:2016-06-21 02:45:16
【问题描述】:
我有一个活动,其 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="ivykoko.com.likechecker.MainActivity">
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/reciclador"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="3dp"
android:scrollbars="vertical" />
<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/content_main" />
</android.support.design.widget.CoordinatorLayout>
如您所见,操作栏覆盖了 recyclerview 的顶部。我能做些什么?
提前致谢。
【问题讨论】:
-
为什么这会让你大吃一惊?
-
@tim-castelijns 好吧,我是 android 的初学者,不知道该怎么做:S
-
让我们先告诉我们您希望看到什么,以及为什么
-
你想做什么?
-
@howdoidothis 我希望操作栏不要覆盖 recyclerview 的第一个元素
标签: android android-actionbar android-recyclerview material-design