2015-08-05 21 views
7

Tôi có cách bố trí sauandroid: sụp đổ thanh công cụ bị trả lại trên cuộn lên

<android.support.design.widget.CoordinatorLayout 
    android:id="@+id/rootLayout" 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:cardview="http://schemas.android.com/apk/res-auto" 
    android:background="@color/white" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <android.support.design.widget.AppBarLayout 
     android:fitsSystemWindows="true" 
     android:layout_width="match_parent" 
     android:layout_height="250dp"> 

     <android.support.design.widget.CollapsingToolbarLayout 
      android:id="@+id/collapsing_toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:minHeight="?attr/actionBarSize" 
      app:layout_scrollFlags="scroll|exitUntilCollapsed" 
      android:fitsSystemWindows="true"> 

       <RelativeLayout 
        xmlns:android="http://schemas.android.com/apk/res/android" 
        android:id="@+id/layout_toolbar" 
        android:layout_width="fill_parent" 
        android:orientation="vertical" 
        app:layout_collapseMode="parallax" 
        android:layout_height="match_parent"> 

         <com.android.volley.toolbox.VolleyImageView 
          android:id="@+id/image_toolbar" 
          android:layout_width="fill_parent" 
          android:layout_height="match_parent" 
          android:scaleType="centerCrop"/> 

         .... some text views aligned over image... 
       </RelativeLayout> 

       <android.support.v7.widget.Toolbar 
        android:id="@+id/tool_bar" 
        android:layout_width="match_parent" 
        android:layout_height="?attr/actionBarSize" 
        app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> 


     </android.support.design.widget.CollapsingToolbarLayout> 
    </android.support.design.widget.AppBarLayout> 

     <android.support.v7.widget.RecyclerView 
     android:id="@+id/list_brands" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     app:layout_behavior="@string/appbar_scrolling_view_behavior"/> 
</android.support.design.widget.CoordinatorLayout> 

Khi tôi di chuyển lên rất nhanh trong tái chế xem thanh công cụ sụp đổ không mở trơn tru nhưng bị trả lại và bị đóng cửa. Tôi không biết cái gì sai. Tôi đang theo dõi this bài viết.

Mọi trợ giúp sẽ được đánh giá cao.

Trả lời

0

CHỈNH SỬA: Cập nhật thiết kế v23 và xem lại v23 có vẻ như để khắc phục hiệu ứng thoát. Bạn cũng cần thay đổi compileSdkVersion thành 23 và buildToolsVersion thành "23.0.0". Hãy v23 biết có lỗi khác như sụp đổ nếu bạn cố gắng để di chuyển từ tiêu đề

at android.support.design.widget.CoordinatorLayout.onTouchEvent(CoordinatorLayout.java:449) 

giải pháp khác nhau cho lỗi mới này ở đây https://code.google.com/p/android/issues/detail?id=183166

Đây là một lỗi theo dõi trên google và họ nói rằng đó là nghĩa vụ được cố định trong com.android.support.design v23

https://code.google.com/p/android/issues/detail?id=175243

+0

Nó dường như không được cố định như tôi đang gặp vấn đề tương tự và cũng là phiên bản mới nhất của IO App Google có prob này lem. – David

Các vấn đề liên quan