Android工具栏滚动行为

时间:2016-08-03 10:21:15

标签: java android android-layout xamarin xamarin.android

我希望工具栏的行为为scroll|enter_always。但是,当我滚动时,工具栏的底部显示在我的透明状态栏下,并卡在那里。

enter image description here

您认为我的布局问题是什么?

<android.support.design.widget.CoordinatorLayout 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="match_parent"
       android:layoutDirection="rtl"
       app:layout_behavior="@string/appbar_scrolling_view_behavior"
       android:fitsSystemWindows="true">
  <android.support.design.widget.AppBarLayout
      android:id="@+id/app_bar_layout"
      app:layout_scrollFlags="scroll|enterAlways"
      android:layout_width="match_parent"
      android:layout_height="wrap_content">
    <android.support.v7.widget.Toolbar
        android:id="@+id/halachotToolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        app:layout_scrollFlags="scroll|enterAlways"
        app:titleTextColor="@color/White"
        android:layoutDirection="rtl" />
  </android.support.design.widget.AppBarLayout>
  <android.support.v4.widget.NestedScrollView
            android:id="@+id/content_frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipToPadding="false"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">
    <android.support.v7.widget.RecyclerView
      android:id="@+id/halachotRecyclerView"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layoutDirection="rtl"
      android:layout_gravity="center_horizontal"
      android:scrollbars="vertical"
      android:clickable="true" />
  </android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>

1 个答案:

答案 0 :(得分:0)

尝试为工具栏设置 android:elevation