码迷,mamicode.com
首页 > 其他好文 > 详细

谷歌官方刷新组件SwipeRefreshLayout

时间:2015-07-03 15:23:06      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:

今天开始使用谷歌的SwipeRefreshLayout,会记下一些坑

1.手动调用setRefreshing(true)不会出现刷新动画

原因是:SwipeRefreshLayout indicator does not appear when the setRefreshing(true) is called before the SwipeRefreshLayout.onMeasure()

解决方法是:http://stackoverflow.com/questions/26858692/swiperefreshlayout-setrefreshing-not-showing-indicator-initially

我选择的是

mSwipeRefreshLayout.setProgressViewOffset(false, 0,
                (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 24, getResources().getDisplayMetrics()));
mSwipeRefreshLayout.setRefreshing(true);

 

谷歌官方刷新组件SwipeRefreshLayout

标签:

原文地址:http://www.cnblogs.com/baron89/p/4618511.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!