Android CoordinatorLayout,AppBar
2020-03-11 本文已影响0人
捡豆豆
问题发现:
CoordinatorLayout,AppBarLayout嵌套 recycleview快速滑动之后 会有近几秒秒的停滞,状态还是SCROLL_STATE_SETTLING 之后状态才变成 SCROLL_STATE_IDLE
这个过程中再滑动页面会出现页面滑动错乱的现象(support库版本从26.0.0)
我这边的xml代码如下
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:elevation="0dp"
app:layout_behavior="com.lemiao.funbidding.widget.WhlBehavior"
android:fitsSystemWindows="true">
<TextView
android:id="@+id/scroll_status"
android:layout_width="match_parent"
android:background="@color/white"
android:layout_height="0dp"
app:layout_scrollFlags="scroll"/>
<com.lemiao.funbidding.widget.bgabanner.BGABanner
android:layout_width="match_parent"
android:layout_height="300dp"
android:id="@+id/play_detail_head_banner"
android:background="@color/white"
app:banner_pageChangeDuration="1000"
app:banner_pointAutoPlayAble="true"
app:banner_pointAutoPlayInterval="6000"
app:banner_pointContainerBackground="@android:color/transparent"
app:banner_pointDrawable="@android:color/transparent"
android:minHeight="44dp"
android:visibility="visible"
app:banner_isNumberIndicator="true"
app:banner_numberIndicatorBackground="@drawable/shape_radius_50black_8"
app:banner_transitionEffect="defaultEffect"
app:layout_scrollFlags="scroll|exitUntilCollapsed"/>
<RelativeLayout
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="57dp">
<LinearLayout
android:id="@+id/play_detail_head_current_price_ll"
android:gravity="bottom"
android:layout_marginTop="3dp"
android:layout_width="match_parent"
android:layout_height="28.5dp">
<TextView
android:id="@+id/play_detail_head_current_price_label"
android:layout_marginLeft="15dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="当前价"
android:textSize="12sp"
android:textColor="@color/text_color_1"/>
<com.lemiao.funbidding.widget.MediumBoldTextView
android:id="@+id/play_detail_head_current_price"
android:layout_marginLeft="3dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:textColor="@color/common_red_2"/>
</LinearLayout>
<LinearLayout
android:layout_below="@+id/play_detail_head_current_price_ll"
android:layout_width="wrap_content"
android:gravity="top"
android:paddingTop="1.5dp"
android:layout_height="28.5dp">
<TextView
android:layout_marginLeft="15dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="市场价"
android:textSize="12sp"
android:textColor="@color/text_color_3"/>
<com.lemiao.funbidding.widget.MediumBoldTextView
android:id="@+id/play_detail_head_price"
android:layout_marginLeft="2dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:textColor="@color/text_color_3"/>
</LinearLayout>
<LinearLayout
android:id="@+id/play_detail_head_status_ll"
android:layout_alignParentRight="true"
android:layout_width="140dp"
android:gravity="center"
android:background="@drawable/shape_rectangle_red"
android:layout_height="match_parent">
<TextView
android:id="@+id/play_detail_head_status_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="结束仅剩"
android:textSize="12sp"
android:textColor="@color/white"/>
<com.lemiao.funbidding.widget.EasyCountDownTextureView
android:id="@+id/play_detail_head_countdown_time"
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:easyCountHour="0"
app:easyCountMinute="0"
app:easyCountSecond="0"
app:easyCountColonColor="@color/white"
app:easyCountBackgroundColor="#F58D91"/>
</LinearLayout>
<LinearLayout
android:id="@+id/play_detail_head_status_ll2"
android:layout_alignParentRight="true"
android:layout_width="140dp"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical"
android:background="@drawable/shape_rectangle_red"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="即将开拍"
android:textSize="12sp"
android:alpha="0.5"
android:textColor="@color/white"/>
<TextView
android:id="@+id/play_detail_head_countdown_time2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="12-26 13:00"
android:textColor="@color/white"/>
</LinearLayout>
</RelativeLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/content_recycle_view"
android:layout_height="match_parent"
android:layout_width="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:overScrollMode="always"
android:scrollbars="none"/>
</android.support.design.widget.CoordinatorLayout>