Skip to content

Commit

Permalink
Added remote dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
captainbupt committed Mar 18, 2016
1 parent 0a88082 commit e9c28b3
Show file tree
Hide file tree
Showing 31 changed files with 216 additions and 147 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
.DS_Store
/build
/captures
.local.properties
/ptr-lib/.local.properties
3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 30 additions & 18 deletions README-cn.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,54 @@
# 修改
# Ultra Pull to Refresh with Load More

本分支对原有的Ultra Pull To Refresh进行了修改,使得其支持了上拉加载更多。和下拉刷新一样,上拉加载同样支持所有view。全部的逻辑都是仿造原有的下拉刷新而来,并且配置信息(阻抗,持续时间等)为两者共享。目前,实例项目demo中只有`主页面``自动刷新`页面演示了如何使用上拉加载更多,不过原理上与下拉刷新一致,应该比较好理解。
本分支对原有的Ultra Pull To Refresh进行了修改,使得其支持了上拉加载更多。

如果想要使用本分支,请直接下载源码并导入IDE中。底部的gradle和maven目前并不支持
[Ultra Pull to Refresh](https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh)是现在已经停止维护的下拉刷新项目的替代方案。继承于ViewGroup可以包含任何View。功能比SwipeRefreshLayout强大。使用起来非常简单。良好的设计,如果你想定制自己的UI样式,非常简单,就像给ListView加一个Header View那么简单

注:本分支没有修改任何原有API。如果你之前已经在使用Ultra Pull To Refresh,那么你可以无缝的转换到本分支上来。

感谢`廖祜秋`开源了这个非常棒的下拉刷新库。他所写的代码可拓展性极高,使得我的修改工作也轻松不少。
支持 `API LEVEL >= 8`

本分支刚刚开发完成,可能会存在bug。如果有问题,欢迎指出!
## 加载更多

Github: https://github.com/captainbupt
本分支对原有的Ultra Pull To Refresh进行了修改,使得其支持了上拉加载更多。和下拉刷新一样,上拉加载同样支持所有view。全部的逻辑都是仿造原有的下拉刷新而来,并且配置信息(阻抗,持续时间等)为两者共享。另外,本分支没有修改任何原有API。如果你之前已经在使用Ultra Pull To Refresh,那么你可以无缝的转换到本分支上来。

博客: http://blog.csdn.net/hwz2311245
实例项目demo中只有`主页面``自动刷新`页面演示了如何使用上拉加载更多。

# 添加的方法和类
## 添加的方法和类

- `setFooterView`:对应于`setHeaderView()`。在set完footer后,你需要调用 `addPtrUIHandler()`,这和设置header的机制是一样的。
- `PtrHandler2`:原有`PtrHandler`类的一个补充。当需要使用上拉加载更多的时候,你应该调用`setPtrHandler(new PtrHandler2())`,而不是`setPtrHandler(new PtrHandler())`
- `PtrDefaultHandler2`:实现了默认的 `checkCanDoLoadMore()` 逻辑,可以适用于大部分的View。机制和`PtrDefaultHandler`一致。
- `PtrClassicDefaultFooter`:默认的footer,将默认header反转了过来。
- `setMode(Mode)`: Mode是本分支的一个新特性。通过调用`setMode`, 你可以任意的开启/关闭header或者footer。参数类型是一个枚举变量,可以通过以下方式调用:`setMode(Mode.BOTH)`.

---
## 引用方法

- 在gradle中:
```
compile 'in.srain.cube:ptr-load-more:1.0'
```

# Ultra Pull To Refresh
- 在maven中:
```
这是现在已经停止维护的下拉刷新项目的替代方案。继承于ViewGroup可以包含任何View。功能比SwipeRefreshLayout强大。
<dependency>
<groupId>in.srain.cube</groupId>
<artifactId>ptr-load-more</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
```

使用起来非常简单。良好的设计,如果你想定制自己的UI样式,非常简单,就像给ListView加一个Header View那么简单。
## 联系方式

支持 `API LEVEL >= 8`
- Github: https://github.com/captainbupt
- 博客: http://blog.csdn.net/hwz2311245
- 邮箱: 285173036@qq.com

[APK下载](https://raw.githubusercontent.com/liaohuqiu/android-Ultra-Pull-To-Refresh/master/ptr-demo.apk)
有任何意见和问题,欢迎在issues中提出,一定尽快回复。

#### 使用eclipse的同学请注意, Intellij IDEA / Android Studio 请忽略
---

**demo可以直接在eclipse中运行, 编译demo项目的同学看这里: http://www.liaohuqiu.net/cn/posts/compile-ultra-ptr-in-eclipse/**
# 以下是原项目的说明

* 先上两张StoreHouse风格的截图! 感谢 [CBStoreHouseRefreshControl](https://github.com/coolbeet/CBStoreHouseRefreshControl).
<div class='row'>
Expand Down
45 changes: 32 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Modification
# Ultra Pull To Refresh with Load More

I had made a modification of the Ultra-Pull-to-Refresh library and let it support load-more function. It supports every view as like as pull-to-refresh. All the logic is simulated to the pull-to-refresh and the configurations(resistance, duration etc.) are shared for both load-more and pull-to-refresh. Currently, only the `Home page(PtrDemoHomeFragment)` and `AutoRefresh(WithGridView)` page in demo are modified to demonstrate how to use load-more. But the mechanism should be the same as pull-to-refresh.
This is a modification of the *Ultra-Pull-to-Refresh* library which supports load-more for any view.

If your want to this fork, please download this project and import to your IDE manually. The gradle and maven below is not supported by this fort yet.
[Ultra Pull to Refresh](https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh) is a replacement for the deprecated pull to refresh solution. It can contain any view you want. It's easy to use and more powerful than SwipeRefreshLayout. It's well designed, you can customize the UI effect you want as easy as adding a headview to ListView.

PS: All the API are not modified. If you have used the origin Ultra-Pull-To-Refresh library, there will be no need to change your code if you move to this fork.
Support `API LEVEL >= 8`, all snapshots are taken from Genymotion, 2.3.7.

Thank you for `Huqiu Liao`, who created such a great library. His code was so scalable and made my modification easier.
# Load more

This fork is just developed and there would be bugs. Please feel free to report me if you found some bugs.
This is a modification of the *Ultra-Pull-to-Refresh* library which supports load-more for any view. It supports every view as like as pull-to-refresh. All the logic is similar to the pull-to-refresh and the configurations(resistance, duration etc.) are shared for both load-more and pull-to-refresh. All the APIs for the origin branch are not modified. If you have used the origin Ultra-Pull-To-Refresh library, **there will be no need to change your code if you move to this branch**.

Github: https://github.com/captainbupt
Currently, only the `Home page(PtrDemoHomeFragment)` and `AutoRefresh(WithGridView)` page in demo are modified to demonstrate how to use load-more.

# New functions and classes

Expand All @@ -20,6 +20,31 @@ Github: https://github.com/captainbupt
- `PtrClassicDefaultFooter`: Serve as a default footer which is the reverse of the default header.
- `setMode(Mode)`: The mode is a new feature of this library. By using `setMode`, you can enable or disable either header or footer. The argument is an enum, you should it like `setMode(Mode.BOTH)`.

## Usage

- in gradle:
```
compile 'in.srain.cube:ptr-load-more:1.0'
```

- in maven:
```
<dependency>
<groupId>in.srain.cube</groupId>
<artifactId>ptr-load-more</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
```

## Contacts

- Github: https://github.com/captainbupt
- Email: weizhou.captain.he@gmail.com

If there is any suggestions or problems, please feel no hesitated to open an issue. I will keep responsing.

---

[![Build Status](https://travis-ci.org/liaohuqiu/android-Ultra-Pull-To-Refresh.svg?branch=master)](https://travis-ci.org/liaohuqiu/android-Ultra-Pull-To-Refresh)
Expand All @@ -29,13 +54,7 @@ Github: https://github.com/captainbupt

# Ultra Pull To Refresh

It's a replacement for the deprecated pull to refresh solution. It can contain any view you want.

It's easy to use and more powerful than SwipeRefreshLayout.

It's well designed, you can customize the UI effect you want as easy as adding a headview to ListView.

Support `API LEVEL >= 8`, all snapshots are taken from Genymotion, 2.3.7.

[Download APK](https://raw.githubusercontent.com/liaohuqiu/android-Ultra-Pull-To-Refresh/master/ptr-demo.apk)

Expand Down
1 change: 0 additions & 1 deletion app/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions app/build.gradle

This file was deleted.

17 changes: 0 additions & 17 deletions app/proguard-rules.pro

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions app/src/main/AndroidManifest.xml

This file was deleted.

Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file not shown.
6 changes: 0 additions & 6 deletions app/src/main/res/values/colors.xml

This file was deleted.

3 changes: 0 additions & 3 deletions app/src/main/res/values/strings.xml

This file was deleted.

11 changes: 0 additions & 11 deletions app/src/main/res/values/styles.xml

This file was deleted.

15 changes: 0 additions & 15 deletions app/src/test/java/in/srain/cube/views/ptr/ExampleUnitTest.java

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
}
}

Expand Down
29 changes: 28 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
ANDROID_BUILD_MIN_SDK_VERSION=8
ANDROID_BUILD_TARGET_SDK_VERSION=23
ANDROID_BUILD_SDK_VERSION=23
ANDROID_BUILD_TOOLS_VERSION=23.0.1
ANDROID_BUILD_TOOLS_VERSION=23.0.1

VERSION_NAME=1.0
GROUP=in.srain.cube
POM_NAME=Ultra Pull to Refresh
POM_ARTIFACT_ID=ptr-load-more
POM_PACKAGING=aar

POM_DESCRIPTION=下拉刷新,上拉加载
#项目地址等,我这使用的是github的项目地址
POM_URL=https://github.com/captainbupt/android-Ultra-Pull-To-Refresh-With-Load-More
POM_SCM_URL=https://github.com/captainbupt/android-Ultra-Pull-To-Refresh-With-Load-More
POM_SCM_CONNECTION=https://github.com/captainbupt/android-Ultra-Pull-To-Refresh-With-Load-More.git
POM_SCM_DEV_CONNECTION=https://github.com/captainbupt/android-Ultra-Pull-To-Refresh-With-Load-More.git

#开源协议
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=captain
POM_DEVELOPER_NAME=Weizhou He

POM_DEVELOPER_EMAIL=weizhou.captain.he@gmail.com
POM_DEVELOPER_URL=http://blog.csdn.net/hwz2311245

GIT_URL=https://github.com/captainbupt/android-Ultra-Pull-To-Refresh-With-Load-More.git
ISSUE_URL=https://github.com/captainbupt/android-Ultra-Pull-To-Refresh-With-Load-More/issues
14 changes: 14 additions & 0 deletions gradle/android-artifacts.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}
Loading

0 comments on commit e9c28b3

Please sign in to comment.