使用TwinklingRefreshLayout开源框架采坑

来源:互联网 发布:乾隆红楼梦 知乎 编辑:程序博客网 时间:2024/05/16 11:00

使用TwinklingRefreshLayout开源框架采坑:
1.在TwinklingRefreshLayout控件中添加RecyclerView等列表控件不能再添加别的控件(TextView)否则会造成如下的混乱界面(滑动过程)

下拉滑动时会界面错乱

2.如果添加LinearLayout会造成RecyclerView中数据填充不完,只有一个手机的界面的数据,所以在布局中尽量注意,下面代码是我采坑后的成果,如果不添加列表类控件则没有这个问题

<?xml version="1.0" encoding="utf-8"?><com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools"    android:id="@+id/refreshLayout"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:orientation="vertical">    <android.support.v7.widget.RecyclerView        android:id="@+id/recyclerView"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:overScrollMode="never" /></com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout>
0 0
原创粉丝点击