Android下拉涮新第三方通用控件
https://github.com/chrisbanes/Android-PullToRefresh


Pull To Refresh Views for Android

This project aims to provide a reusable Pull to Refresh widget for Android. It was originally based on Johan Nilsson's library (mainly for graphics, strings and animations), but these have been replaced since.

Features

  • Supports both Pulling Down from the top, and Pulling Up from the bottom (or even both).
  • Animated Scrolling for all devices.
  • Over Scroll supports for devices on Android v2.3+.
  • Currently works with:
    • ListView
    • ExpandableListView
    • GridView
    • WebView
    • ScrollView
    • HorizontalScrollView
    • ViewPager
  • Integrated End of List Listener for use of detecting when the user has scrolled to the bottom.
  • Maven Support.
  • Indicators to show the user when a Pull-to-Refresh is available.
  • Support for ListFragment!
  • Lots of Customisation options!

Repository at https://github.com/chrisbanes/Android-PullToRefresh.

Sample Application

The sample application (the source is in the repository) has been published onto Google Play for easy access:

Usage

To begin using the library, please see the Quick Start Guide page.

Customisation

Please see the Customisation page for more information on how to change the behaviour and look of the View.

Pull Up to Refresh

By default this library is set to Pull Down to Refresh, but if you want to allow Pulling Up to Refresh then you can do so. You can even set the View to enable both Pulling Up and Pulling Down using the 'both' setting. See the Customisation page for more information on how to set this.

Apps

Want to see which Apps are already using Android-PullToRefresh? Have a look here. If you have an App which is not on the list, let me know.

Changelog

Please see the new Changelog page to see what's recently changed.

Pull Requests

I will gladly accept pull requests for fixes and feature enhancements but please do them in the dev branch. The master branch is for the latest stable code, dev is where I try things out before releasing them as stable. Any pull requests that are against master from now on will be closed asking for you to do another pull against dev.

Acknowledgments

License

Copyright 2011, 2012 Chris Banes

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Android_下拉刷新上拉加载_FloatMath.floor()不能用

 

下拉刷新上拉加载我们一般都是用pullrefreshview第三方开元的框架,但是有心的人会发现android6.0 PullToRefreshWebView中的FloatMath.floor()不能用了怎么替换

protected boolean isReadyForPullEnd() {
float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
}

解决思路:

Android6.0使用 Math.floor 代替 FloatMath.floor 即可

 

这里备份一个能够正常在最新android studio 3.4.x最新版本的上拉下拉自动刷新的工程,希望能帮助到感兴趣的同学。下载地址
 

Android下拉涮新第三方通用控件的更多相关文章

  1. easy ui 下拉框绑定数据select控件

    easy ui 中的下拉框控件叫做select,具体代码如下: html代码:①.这是一个公司等级的下拉框 <tr> <td>公司等级:</td> <td&g ...

  2. easy ui 下拉级联效果 ,下拉框绑定数据select控件

    html代码: ①两个下拉框,一个是省,另一个市 <tr> <td>省:</td> <td> <select id="ProvinceI ...

  3. 【原创】窥视懒人的秘密---android下拉刷新开启手势的新纪元

    小飒的成长史原创作品:窥视懒人的秘密---android下拉刷新开启手势的新纪元转载请注明出处 **************************************************** ...

  4. Android下拉刷新底部操作栏的隐藏问题

    最近自己编写下拉刷新的时候,发现了一个问题,就是有一个需求是这样的:要求页面中是一个Tab切换界面,一个界面有底部操作栏,不可下拉刷新,另一个界面没有底部操作栏,但可以下拉刷新. 按照平常的做法,我在 ...

  5. Android 下拉刷新上拉载入 多种应用场景 超级大放送(上)

    转载请标明原文地址:http://blog.csdn.net/yalinfendou/article/details/47707017 关于Android下拉刷新上拉载入,网上的Demo太多太多了,这 ...

  6. 五种情况下会刷新控件状态(刷新所有子FWinControls的显示)——从DFM读取数据时、新增加子控件时、重新创建当前控件的句柄时、设置父控件时、显示状态被改变时

    五种情况下会刷新控件状态(刷新控件状态才能刷新所有子FWinControls的显示): 在TWinControls.PaintControls中,对所有FWinControls只是重绘了边框,而没有整 ...

  7. QuickBase64 - Android 下拉通知栏快捷base64加解密工具

    Android Quick Setting Tile Base64 Encode/Decode Tool Android 下拉通知栏快捷 base64 加解密,自动将剪切板的内容进行 base64 E ...

  8. Xamarin.Form 5.0: 新功能和控件以及调试改进

    上周在.NET Conf 2020,Scott Hunter(.NET),Maddy Leger(微软移动开发工具-Xamarin项目经理)和David Ortinau(首席项目经理,移动开发人员工具 ...

  9. MVC通用控件库展示-MVC4.0+WebAPI+EasyUI+Knockout--SNF快速开发平台3.0

    在我们开发中怎么才能提高效率,就是要有大量的公共组件(控件)可以直接使用而不用自己再开发一遍,既然是公共控件那也得简单实用才行.下面就介绍一下SNF-MVC当中的控件库. 总体控件库展示: 1.通用用 ...

随机推荐

  1. Flutter——Checkbox组件、CheckboxListTile(多选框组件)

    Checkbox组件 Checkbox组件常用的属性: 属性 描述 value true 或者 false onChanged 改变的时候触发的事件  activeColor 选中的颜色.背景颜色 c ...

  2. java - day017 - 线程

    进程 操作系统中, 并行执行的任务 线程 进程内部, 并行执行的任务 进程包含线程 线程的创建 继承Thred 定义 Thred 的子类 重写 run() 方法 在 run() 方法中的代码, 是与其 ...

  3. Linux磁盘管理——虚拟文件系统

    前言 Linux支持众多文件系统,包括: 传统文件系统:ext2 / minix / MS-DOS / FAT (用 vfat 模块) / iso9660 (光盘)等等:日志式文件系统: ext3 / ...

  4. npm link的使用

    npm link的使用 https://www.jianshu.com/p/aaa7db89a5b2

  5. 负载均衡集群(LBC)

    一.LVS简介及工作模式1. LVS简介Linux Virtual Server,该软件的功能是实现LB(load balance) 2.LVS的三种工作模式 1)NAT模式(NAT) LVS 服务器 ...

  6. 入门: 在Windows上搭建Flutter开发环境

    使用镜像 由于在国内访问Flutter有时可能会受到限制,Flutter官方为中国开发者搭建了临时镜像,大家可以将如下环境变量加入到用户环境变量中: export PUB_HOSTED_URL=htt ...

  7. 智能灯控(基于ZigBee)

    时间:2017年12月 阶段:大二上学期 背景:单片机原理与应用课设 名称:智能灯控 摘要 本系统实现了多方式控灯功能,有按键控灯.串口指令控灯.点对点无线射频控灯.AI模式控灯.其中AI模式控灯是通 ...

  8. 004_Python3 注释

    确保对模块, 函数, 方法和行内注释使用正确的风格 Python中的注释有单行注释和多行注释:Python中单行注释以 # 开头,例如::# 这是一个注释print("Hello, Worl ...

  9. 九.配置SMB共享(Samba共享)

    • Samba 软件项目 – 用途:为客户机提供共享使用的文件夹 – 协议:SMB(TCP 139).CIFS(TCP 445)  • 所需软件包:samba • 系统服务:smb   管理共享账号 ...

  10. CF280C Game on Tree 概率与期望

    利用期望的线性性,即 $E(a+b)=E(a)+E(b)$. 对于所有点分别求一下期望然后累加即可. code: #include <bits/stdc++.h> #define N 10 ...