TwinklingRefreshLayout
TwinklingRefreshLayout copied to clipboard
TwinklingRefreshLayout中包含几个控件,其中包括recyclerview,recyclerview与TwinklingRefreshLayout的滑动冲突了
TwinklingRefreshLayout中包含几个控件,其中包括recyclerview,recyclerview的高度是固定的,此时recyclerview与TwinklingRefreshLayout的滑动冲突了,请问有什么解决方法么?
代码如下
<?xml version="1.0" encoding="utf-8"?>
<com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorBase">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="34dp"
android:layout_marginTop="@dimen/space_10"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:text="常用"
android:textColor="@color/black"
android:textSize="@dimen/text_size_14" />
<TextView
android:id="@+id/menu_setting_tv"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="10dp"
android:gravity="center"
android:text="\ue6ee"
android:textColor="@color/gray"
android:textSize="@dimen/text_size_14" />
</RelativeLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/fav_menu_rv"
android:layout_width="match_parent"
android:layout_height="280dp">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout>
解决了没?
recyclerView.setLayoutManager(new LinearLayoutManager(this){ @Override public boolean canScrollVertically() { return false; } });