canyinghao / canrefresh Goto Github PK
View Code? Open in Web Editor NEW可适配所有视图的下拉刷新上拉加载,并支持各种风格。
License: Apache License 2.0
可适配所有视图的下拉刷新上拉加载,并支持各种风格。
License: Apache License 2.0
用RecycleView展示数据, 在三星手机经常出现无法触发点击事件,不知道为什么,有时候点可以,有时候点不行,经常出现无法触发列表的点击事件。
你好,我在在4.4系统的机子上使用,使用CollapsingToolbarLayout的模式,上拉加载或者上拉取消加载时,底部回弹后,顶部会出现一个间距。请问出现这样问题应该如何解决
android.view.InflateException: Binary XML file line #44: mContentView is null
我的布局如下
<com.canyinghao.canrefresh.CanRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/canfresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:background="#fff"
android:layout_width="match_parent"
android:layout_height="40dp">
<ImageView
android:id="@+id/iv_search_brand"
android:src="@drawable/search_large"
android:layout_marginLeft="10dp"
android:layout_centerVertical="true"
android:layout_width="25dp"
android:layout_height="25dp" />
<TextView
android:layout_centerVertical="true"
android:layout_centerInParent="true"
android:text="品牌"
android:textSize="16sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
<android.ye.fashioncircle.view.verticalViewPager.VerticalViewPager
android:id="@+id/vertical_viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.ye.fashioncircle.view.verticalViewPager.VerticalViewPager>
加载更多时,仍然可以下滑,导致加载更多的布局漂浮在 content 布局上。
用demo 也会出现这个问题,手指点击下去的时候稍微偏移一点就失效了,touch就被捕获了
配合CollapsingToolbarLayout使用上拉加载更多的时候,有时候不会滑动到页面最底部才开始上拉加载,会直接在当前屏幕的最底部开始加载跟多
我按照demo里面的activity_coo的写法,在CoordinatorLayout中使用刷新控件,唯一不同的是我使用的是listview,我现在有这样的问题,要一次性滑动到底才能到达底部,如果在中间部分停止了,就不能滑动到底部了,直接就触发了上拉加载,请问应该如何解决这个问题?
不知道有没有发现用google刷新的时候下拉刷新那个圆圈会有一段图标看不到
设备:荣耀8青春版
Android版本:7.0
描述:初始化Fragment的时候 进入页面 ,自动刷新会出现卡顿现象
请问大佬那个100L设置是了啥?
这项目很不错,但我想要更好
#1. layout_height
com.canyinghao.canrefresh.CanRefreshLayout
的android:layout_height
以及
<android.support.v7.widget.RecyclerView android:id="@id/can_content_view" android:layout_width="match_parent" android:layout_height="match_parent"
的android:layout_height
试过只能设置为android:layout_height="match_parent",
能不能支持设置为wrap_content
;
意思是CanRefreshLayout和RecyclerView的高度随着RecyclerView的item数量变化,
比如RecyclerView的item数量是2个,CanRefreshLayout就是2个item高度,下边不会有空白;RecyclerView item数量是1个,CanRefreshLayout就是1个item高度,下边不会有空白;RecyclerView item数量是200个,CanRefreshLayout就是默认的最大高度,比如半屏。
#2. emptyview
比如我的emptyview 一个无网络,一个无搜索结果, 无搜索结果,同时也要支持下拉刷新,就不能和RecyclerView放同一个CanRefreshLayout下边,emptyview也不放在RecyclerView里边
emptyview里有一个imageview,一个texitview和一个button,比如 <RelativeLayout android:id="@+id/noNetwork" <ImageView .../> <TextView 网络不给力.../> <Button 点击重试.../>
;
以上有app参考,汽车之家的“二手车之家”app(che168.com), 安装运行后在首页(底部是首页、买车、卖车、工具、我的),点‘买车’,
在买车页右上角点地图那个图标,然后地图上随便点1-3个车源的点,出来的列表高度是可变的,最大高度半屏,同时支持下拉刷新,无网络页面。
当加载更多时,底部怎么显示新加载的item啊?
其他机子都没发现问题,但是三星的大部分机子都会出现列表点击事件无效,应该是手指点击的时候轻微(向上或者向下)触发了CanRefreshLayout里面的touch 事件,item 的点击被捕获了,可能是三星的机子比较灵敏,其他机子倒是没发现这个问题,失效概率挺高的。
第一次进入滑动界面,第一次使用下拉刷新或上拉加载,回调中的complete方法不起作用,要向反方向再上拉或下拉一次才能complete成功.
还有一个问题,是使用一次下拉之后不能紧接着执行下拉操作,必须上拉和下拉交替着来,才能使用,看了源码之后试着重写了一些方法都没有解决问题,暂时没有解决方案,希望您能抽时间解答一下,谢谢
java.lang.IllegalStateException: mContentView is null at com.canyinghao.canrefresh.CanRefreshLayout.onFinishInflate(CanRefreshLayout.java:434) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:844) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:811) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:811) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:394) Copy stack to clipboard
Scrollview 中添加 listview 上拉加载 白屏问题 如何解决
且CollapsingToolbarLayout中有ToolBar设置为pin 有ImageView设置为parallax;
然后想实现的效果是只在RecycleView的上下方可以刷新/加载更多;
现在的话 滑动效果就会怪怪的;
请问大神要怎么解决;
业务的使用,Fragment页面的Layout就一个ListView,所以外包围只用了CanRefreshLayout,但是 TabHost.setup(this, getSupportFragmentManager(), R.id.xxxxx)这种情况,只能自动刷新,后来看了下您的代码,我在CanRefreshLayout外层加了一层LinearLayout就可以解决,想问下您是不是有什么其他更优雅的解决方案,而是我不知道的:)
可否点击加载更多
当我将recyclerView动态由LinearManager改变为GridManager时,CanRecyclerHeaderAndFooterView向上偏移到底部与RecyclerView对齐。’
app:can_bg_up="@mipmap/yalantis_phoenix_sky"
app:can_bg_down="@mipmap/yalantis_phoenix_sky"
请问设置这两个参数,但是没发生变化
当Toolbar设置了layout_scrollFlags="scroll|enterAlways",刚开始向下滑动的时候会有卡顿,但是滑过header的高度后就正常了
我在将你的项目加入dependencies编译后出现很多貌似没用的library,类似support-compat、support-core-ui、support-core-util这些包,请问这些包是必要的么
设置头部箭头图片及文字颜色
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.