2016-08-03 19 views
0

Ich möchte, dass die Symbolleiste das Verhalten von scroll|enter_always haben wird. Wenn ich jedoch scrolle, wird der untere Teil der Symbolleiste unter meiner Transparenz-Statusleiste angezeigt und bleibt dort hängen.Android Symbolleiste scroll Verhalten

enter image description here

Was denken Sie, das Problem mit meinem Layout ist?

<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> 
+0

Wie Sie erreichen wollen? Entfernen Sie _app: layout_behavior = "@ string/appbar_scrolling_view_behavior" _ von _CoordinateLayout_ – Piyush

+2

Versuchen Sie, den 'android: fitsSystemWindows =" true "-Teil aus Ihrem' CoordinatorLayout' zu entfernen. Soweit ich weiß, fügt dieser seinen Inhalt durch die Höhe der Statusleiste ein, die die 'Toolbar' führt, um zu glauben, dass sie bereits komplett verschwunden ist. – TR4Android

Antwort

0

Versuchen Sie, die android Einstellung: Höhen für die Symbolleiste