├── .classpath
├── .project
├── .svn
├── entries
├── format
├── pristine
│ ├── 14
│ │ ├── 1490f91a6f93b9897932ea44f006320096f7b294.svn-base
│ │ └── 14f3766d558749b48fe3c7ce5c85c52025f07cd1.svn-base
│ ├── 15
│ │ └── 1581aae9b27449b5ed151373876821b8ce7afeaa.svn-base
│ ├── 22
│ │ ├── 220a615a14f07f4b7b21cdfd0c697075beb1620f.svn-base
│ │ └── 2238428dd649cf3c3689b5835411cea06c015edc.svn-base
│ ├── 26
│ │ └── 2669873f891113a8f45506e825d0215306e95405.svn-base
│ ├── 40
│ │ └── 40d7d87db8715e1eab4762172c5e18574a364460.svn-base
│ ├── 42
│ │ └── 42627ac5da3a69f9853d514a93e93ddfc38fdba7.svn-base
│ ├── 43
│ │ └── 43466c0e948ad95cd5f402a9a62f730aba9665a7.svn-base
│ ├── 50
│ │ └── 5044abc2544992cd3c5d38e41481aba7549d6a01.svn-base
│ ├── 55
│ │ └── 55d1983d9ecd6a8681fd704b1e767c3a2fc8769e.svn-base
│ ├── 56
│ │ └── 56daec2a780f7f0c21b2657fb659a6d592698eae.svn-base
│ ├── 59
│ │ └── 59b08cc1a7fb8d465f7c2ecc490a279f896a6c0e.svn-base
│ ├── 73
│ │ ├── 73b3d0b5be8874b3cfe5b24f2c86750865fda950.svn-base
│ │ └── 73c954abc763402d35ea0c2ff879265cabe6b2be.svn-base
│ ├── 76
│ │ └── 76b02041628cc3032007b979c1ee546dc36df382.svn-base
│ ├── 77
│ │ └── 77dfc1ff919d65721e6eaa085d529f7bb84e83fa.svn-base
│ ├── 79
│ │ └── 79b54523cb874cc6103b2bd67c8b79c19afe9e1e.svn-base
│ ├── 85
│ │ └── 8528d92d3d2467b4419a457b6b5839ea6aa71e52.svn-base
│ ├── 89
│ │ └── 890f09fe55be132a8314ad62d372980e208e4ee2.svn-base
│ ├── 90
│ │ └── 90c96ccdc91b6f0f8e91a8ca9e4e206599f962a3.svn-base
│ ├── 92
│ │ ├── 921724f79580b7061eabce53cf981d4b6a63b57d.svn-base
│ │ └── 92d06604fb0a420fa9bce91ec8eb2a6db2f31efd.svn-base
│ ├── 97
│ │ └── 9743c744a5bde88262c3100b65ea2950a0afcfe4.svn-base
│ ├── 98
│ │ └── 98d53fcce697e8b40e6a664996fcbe581b4af04f.svn-base
│ ├── 03
│ │ └── 0352496cc107b2ddbeaaf0252453ab4c2f042451.svn-base
│ ├── 04
│ │ ├── 044e30715ac62a30cd9c57e540a69fca26dc648e.svn-base
│ │ └── 045420befcd955199fb287fa6c22bd270c2a9d09.svn-base
│ ├── 05
│ │ └── 059b686e9e9378b057e353ef9cffa6a874c1cb0d.svn-base
│ ├── 06
│ │ └── 0619ed95aee5025d6de49b9f182c7ed9e6f2d3bd.svn-base
│ ├── 0a
│ │ └── 0a79aa18a3aa4a97e7ec4aa3eb10554a8caec2af.svn-base
│ ├── 0c
│ │ └── 0c4e698e31589f8612d24302909fbf393e07520a.svn-base
│ ├── 1b
│ │ └── 1b03f92c7ad2f248c189a7d0bf09b1854e63cd9d.svn-base
│ ├── 2b
│ │ └── 2b8b815229aa8a61e483fb4ba0588b8b6c491890.svn-base
│ ├── 2e
│ │ └── 2e5728ef780f7892a050664fc5db0759f84ca79a.svn-base
│ ├── 3e
│ │ └── 3ed29f2e7fd4d9afa2ec7019b6335efba096be9b.svn-base
│ ├── 4c
│ │ └── 4ccefa133be54c9bc35ce12607f292af4f0d94f3.svn-base
│ ├── 5a
│ │ └── 5a978353722590218a9d6f98618fde0ca3f40112.svn-base
│ ├── 5b
│ │ └── 5b566ecf33c4dfb9fbe323d2697ad547a837a65e.svn-base
│ ├── 6a
│ │ └── 6a64226af25472cfdbea23fd226e03698b364a96.svn-base
│ ├── 6f
│ │ └── 6f54caa883ef098511ce6cfd48bcf6b24f2d095c.svn-base
│ ├── 7c
│ │ └── 7c7ca7d5d770d74cdca32a0de47cfcc42f2baf49.svn-base
│ ├── 7d
│ │ └── 7d9c566fdb67fdbe66cac1abba4ae539e75e8be7.svn-base
│ ├── 7e
│ │ ├── 7e7631515569e4e1c0d2299a109b7dc1f9f896e2.svn-base
│ │ └── 7ed59ff5c7eeef35ac5505e2f48250f034546815.svn-base
│ ├── 8c
│ │ └── 8c958dbc5d25b2bd5f48c3187f527d2afe7734a5.svn-base
│ ├── 8e
│ │ └── 8e7199096b2053144b6f0e12bc83378c8a18bac3.svn-base
│ ├── 9b
│ │ └── 9b63980984e59ee09dccb82a75b936c3d9ec83fc.svn-base
│ ├── 9d
│ │ └── 9d5224b362e03b6c8bdd4179cf91bc7a750e69f9.svn-base
│ ├── a2
│ │ └── a2a50171be27512e43e52225b06dc8d2538bc1bd.svn-base
│ ├── a3
│ │ └── a396b072ee70577a67f05e9a3e191e6b53027175.svn-base
│ ├── a6
│ │ └── a6ac7c001a25836cd15c917b3c4ca7f292dcb755.svn-base
│ ├── a8
│ │ ├── a8871fcf8fa9c6d6bd0236d538f89f4772004995.svn-base
│ │ └── a8ea5050fa418cec8d5a20b1f82bc195dd405d3f.svn-base
│ ├── a9
│ │ └── a9d5151869fe636a0da558e0d770d1fcc060a77c.svn-base
│ ├── aa
│ │ └── aa043338af5d6a0edd71719feeb03328aaa660a4.svn-base
│ ├── ad
│ │ └── adef3b43976d58b28567b7da655f5af61cec6c7a.svn-base
│ ├── b0
│ │ └── b0950cb3cf610eeb259f55e8e5b6c9eb6b1d4018.svn-base
│ ├── b5
│ │ └── b5d3d6f0ac5c1cb285ba3a232c08e1287c403542.svn-base
│ ├── b7
│ │ └── b7f116371e4a0934ee462f59f5978ad1628835ec.svn-base
│ ├── b9
│ │ └── b92de2f7e58729d2c04950de2a177d44b9d0c156.svn-base
│ ├── ba
│ │ ├── ba6e0026fe5aa484919de36d6e1f162cb9296515.svn-base
│ │ └── badca346bab97fafbc176381e69cd2ecedf5d7e0.svn-base
│ ├── be
│ │ └── be5ba4b2f13c0f653bd0bb67e6aec92bdafa1d15.svn-base
│ ├── c5
│ │ └── c527bd2ed5f3786db22db4b794b249b7aa054229.svn-base
│ ├── c9
│ │ └── c9fee69739681a87a4f6cdd12d16dfb9a8319622.svn-base
│ ├── ca
│ │ └── caee00c23c74004c1b738d16bdde86e7f03f8f71.svn-base
│ ├── cd
│ │ └── cd745f97cd7c31531f7ea497eac15075104e3c74.svn-base
│ ├── d0
│ │ ├── d07c8115541fcdad2b4452db7ee345ba693a8b2b.svn-base
│ │ └── d0e7ea106347bd70950420f5736cf1e1cbc9f160.svn-base
│ ├── d6
│ │ └── d678897728ca4fe8acf750aa03e0acbe138f9122.svn-base
│ ├── d7
│ │ └── d7310c85da93146187316796a0358a5d513db205.svn-base
│ ├── db
│ │ ├── db05693137c654fcf559046a295b4042bb83bfa2.svn-base
│ │ └── dba535818d6f67c4f23abd5467c35f085a3dbc4b.svn-base
│ ├── e5
│ │ └── e5f8612a77399ec5c5a3ea8dd1ed841a6c76a0e8.svn-base
│ ├── e9
│ │ └── e92f5397b8a07cc1d6de098942c2ded51f043603.svn-base
│ ├── eb
│ │ └── eb8ff9bcdd6ef6532f759cdde88c01312aa6e199.svn-base
│ ├── ec
│ │ └── ec9abc7aa56dc58e9dbd8de0dce094bd0dc5c185.svn-base
│ ├── f1
│ │ └── f1a36bbac81b90b04333bbafa27b6f84b3a3946c.svn-base
│ ├── f7
│ │ └── f70e25fa50d627eeb926c2e7d4dc6eb511ba4f85.svn-base
│ ├── fa
│ │ └── fac2d7e3d1d91262016b2a80483dc42e37ee5c65.svn-base
│ ├── fc
│ │ ├── fc1d48d3e807bbf8a2fc2412fa16e6a05ac16b59.svn-base
│ │ └── fc72798fd8c05bf4e1e1b79a1e422abe34e7ea79.svn-base
│ ├── fe
│ │ └── fe30e92fbf1c987979f89acd1ca702cd6ddaaa5a.svn-base
│ └── ff
│ │ └── ffacca9d3702583d187cf451cdcbb4ef9b1485d9.svn-base
├── tmp
│ ├── project.properties.tmp
│ └── svn.tmp
└── wc.db
├── AndroidManifest.xml
├── LICENSE
├── README.md
├── bin
├── AndroidManifest.xml
├── R.txt
├── classes
│ └── com
│ │ ├── etsy
│ │ └── android
│ │ │ └── grid
│ │ │ ├── ClassLoaderSavedState$1.class
│ │ │ ├── ClassLoaderSavedState$2.class
│ │ │ ├── ClassLoaderSavedState.class
│ │ │ ├── ExtendableListView$AdapterDataSetObserver.class
│ │ │ ├── ExtendableListView$FixedViewInfo.class
│ │ │ ├── ExtendableListView$FlingRunnable.class
│ │ │ ├── ExtendableListView$LayoutParams.class
│ │ │ ├── ExtendableListView$ListSavedState$1.class
│ │ │ ├── ExtendableListView$ListSavedState.class
│ │ │ ├── ExtendableListView$PerformClick.class
│ │ │ ├── ExtendableListView$RecycleBin.class
│ │ │ ├── ExtendableListView$WindowRunnnable.class
│ │ │ ├── ExtendableListView.class
│ │ │ ├── HeaderViewListAdapter.class
│ │ │ ├── StaggeredGridView$GridItemRecord$1.class
│ │ │ ├── StaggeredGridView$GridItemRecord.class
│ │ │ ├── StaggeredGridView$GridLayoutParams.class
│ │ │ ├── StaggeredGridView$GridListSavedState$1.class
│ │ │ ├── StaggeredGridView$GridListSavedState.class
│ │ │ ├── StaggeredGridView.class
│ │ │ └── util
│ │ │ ├── DynamicHeightImageView.class
│ │ │ └── DynamicHeightTextView.class
│ │ └── handmark
│ │ └── pulltorefresh
│ │ └── library
│ │ ├── BuildConfig.class
│ │ ├── ILoadingLayout.class
│ │ ├── IPullToRefresh.class
│ │ ├── LoadingLayoutProxy.class
│ │ ├── OverscrollHelper.class
│ │ ├── PullToRefreshAdapterViewBase.class
│ │ ├── PullToRefreshBase$1.class
│ │ ├── PullToRefreshBase$2.class
│ │ ├── PullToRefreshBase$3.class
│ │ ├── PullToRefreshBase$AnimationStyle.class
│ │ ├── PullToRefreshBase$Mode.class
│ │ ├── PullToRefreshBase$OnLastItemVisibleListener.class
│ │ ├── PullToRefreshBase$OnPullEventListener.class
│ │ ├── PullToRefreshBase$OnRefreshListener.class
│ │ ├── PullToRefreshBase$OnRefreshListener2.class
│ │ ├── PullToRefreshBase$OnSmoothScrollFinishedListener.class
│ │ ├── PullToRefreshBase$Orientation.class
│ │ ├── PullToRefreshBase$SmoothScrollRunnable.class
│ │ ├── PullToRefreshBase$State.class
│ │ ├── PullToRefreshBase.class
│ │ ├── PullToRefreshExpandableListView$InternalExpandableListView.class
│ │ ├── PullToRefreshExpandableListView$InternalExpandableListViewSDK9.class
│ │ ├── PullToRefreshExpandableListView.class
│ │ ├── PullToRefreshGridView$InternalGridView.class
│ │ ├── PullToRefreshGridView$InternalGridViewSDK9.class
│ │ ├── PullToRefreshGridView.class
│ │ ├── PullToRefreshHorizontalScrollView$InternalHorizontalScrollViewSDK9.class
│ │ ├── PullToRefreshHorizontalScrollView.class
│ │ ├── PullToRefreshListView$InternalListView.class
│ │ ├── PullToRefreshListView$InternalListViewSDK9.class
│ │ ├── PullToRefreshListView.class
│ │ ├── PullToRefreshScrollView$InternalScrollViewSDK9.class
│ │ ├── PullToRefreshScrollView.class
│ │ ├── PullToRefreshStaggeredGridView$InternalStaggeredGridViewSDK9.class
│ │ ├── PullToRefreshStaggeredGridView.class
│ │ ├── PullToRefreshWebView$1.class
│ │ ├── PullToRefreshWebView$2.class
│ │ ├── PullToRefreshWebView$InternalWebViewSDK9.class
│ │ ├── PullToRefreshWebView.class
│ │ ├── R$anim.class
│ │ ├── R$attr.class
│ │ ├── R$dimen.class
│ │ ├── R$drawable.class
│ │ ├── R$id.class
│ │ ├── R$layout.class
│ │ ├── R$string.class
│ │ ├── R$styleable.class
│ │ ├── R.class
│ │ ├── extras
│ │ ├── PullToRefreshWebView2$JsValueCallback.class
│ │ ├── PullToRefreshWebView2.class
│ │ └── SoundPullEventListener.class
│ │ └── internal
│ │ ├── EmptyViewMethodAccessor.class
│ │ ├── FlipLoadingLayout.class
│ │ ├── IndicatorLayout.class
│ │ ├── LoadingLayout.class
│ │ ├── RotateLoadingLayout.class
│ │ ├── Utils.class
│ │ ├── ViewCompat$SDK11.class
│ │ ├── ViewCompat$SDK16.class
│ │ └── ViewCompat.class
├── jarlist.cache
├── pulltorefreshlibrary.jar
└── res
│ └── crunch
│ ├── drawable-hdpi
│ ├── default_ptr_flip.png
│ ├── default_ptr_rotate.png
│ ├── indicator_arrow.png
│ ├── loading1.png
│ └── loading2.png
│ ├── drawable-mdpi
│ ├── default_ptr_flip.png
│ ├── default_ptr_rotate.png
│ └── indicator_arrow.png
│ └── drawable-xhdpi
│ ├── default_ptr_flip.png
│ ├── default_ptr_rotate.png
│ ├── indicator_arrow.png
│ ├── loading1.png
│ └── loading2.png
├── build.xml
├── gen
└── com
│ └── handmark
│ └── pulltorefresh
│ └── library
│ ├── BuildConfig.java
│ └── R.java
├── libs
└── android-support-v4.jar
├── local.properties
├── pom.xml
├── proguard-project.txt
├── project.properties
├── res
├── anim
│ ├── slide_in_from_bottom.xml
│ ├── slide_in_from_top.xml
│ ├── slide_out_to_bottom.xml
│ └── slide_out_to_top.xml
├── drawable-hdpi
│ ├── default_ptr_flip.png
│ ├── default_ptr_rotate.png
│ ├── indicator_arrow.png
│ ├── loading1.png
│ └── loading2.png
├── drawable-mdpi
│ ├── default_ptr_flip.png
│ ├── default_ptr_rotate.png
│ └── indicator_arrow.png
├── drawable-xhdpi
│ ├── default_ptr_flip.png
│ ├── default_ptr_rotate.png
│ ├── indicator_arrow.png
│ ├── loading1.png
│ └── loading2.png
├── drawable
│ ├── image_loading.xml
│ ├── indicator_bg_bottom.xml
│ └── indicator_bg_top.xml
├── layout
│ ├── pull_to_refresh_header_horizontal.xml
│ └── pull_to_refresh_header_vertical.xml
└── values
│ ├── attrs.xml
│ ├── dimens.xml
│ ├── ids.xml
│ └── pull_refresh_strings.xml
└── src
└── com
├── etsy
└── android
│ └── grid
│ ├── ClassLoaderSavedState.java
│ ├── ExtendableListView.java
│ ├── HeaderViewListAdapter.java
│ ├── StaggeredGridView.java
│ └── util
│ ├── DynamicHeightImageView.java
│ └── DynamicHeightTextView.java
└── handmark
└── pulltorefresh
└── library
├── ILoadingLayout.java
├── IPullToRefresh.java
├── LoadingLayoutProxy.java
├── OverscrollHelper.java
├── PullToRefreshAdapterViewBase.java
├── PullToRefreshBase.java
├── PullToRefreshExpandableListView.java
├── PullToRefreshGridView.java
├── PullToRefreshHorizontalScrollView.java
├── PullToRefreshListView.java
├── PullToRefreshScrollView.java
├── PullToRefreshStaggeredGridView.java
├── PullToRefreshWebView.java
├── extras
├── PullToRefreshWebView2.java
└── SoundPullEventListener.java
└── internal
├── EmptyViewMethodAccessor.java
├── FlipLoadingLayout.java
├── IndicatorLayout.java
├── LoadingLayout.java
├── RotateLoadingLayout.java
├── Utils.java
└── ViewCompat.java
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | PullToRefreshLibrary
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/.svn/entries:
--------------------------------------------------------------------------------
1 | 12
--------------------------------------------------------------------------------
/.svn/format:
--------------------------------------------------------------------------------
1 | 12
--------------------------------------------------------------------------------
/.svn/pristine/03/0352496cc107b2ddbeaaf0252453ab4c2f042451.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/03/0352496cc107b2ddbeaaf0252453ab4c2f042451.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/04/045420befcd955199fb287fa6c22bd270c2a9d09.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
--------------------------------------------------------------------------------
/.svn/pristine/05/059b686e9e9378b057e353ef9cffa6a874c1cb0d.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.extras;
17 |
18 | import java.util.concurrent.atomic.AtomicBoolean;
19 |
20 | import android.content.Context;
21 | import android.util.AttributeSet;
22 | import android.webkit.WebView;
23 |
24 | import com.handmark.pulltorefresh.library.PullToRefreshWebView;
25 |
26 | /**
27 | * An advanced version of {@link PullToRefreshWebView} which delegates the
28 | * triggering of the PullToRefresh gesture to the Javascript running within the
29 | * WebView. This means that you should only use this class if:
30 | *
31 | *
32 | * - {@link PullToRefreshWebView} doesn't work correctly because you're using
33 | *
overflow:scroll
or something else which means
34 | * {@link WebView#getScrollY()} doesn't return correct values.
35 | * - You control the web content being displayed, as you need to write some
36 | * Javascript callbacks.
37 | *
38 | *
39 | *
40 | * The way this call works is that when a PullToRefresh gesture is in action,
41 | * the following Javascript methods will be called:
42 | * isReadyForPullDown()
and isReadyForPullUp()
, it is
43 | * your job to calculate whether the view is in a state where a PullToRefresh
44 | * can happen, and return the result via the callback mechanism. An example can
45 | * be seen below:
46 | *
47 | *
48 | *
49 | * function isReadyForPullDown() {
50 | * var result = ... // Probably using the .scrollTop DOM attribute
51 | * ptr.isReadyForPullDownResponse(result);
52 | * }
53 | *
54 | * function isReadyForPullUp() {
55 | * var result = ... // Probably using the .scrollBottom DOM attribute
56 | * ptr.isReadyForPullUpResponse(result);
57 | * }
58 | *
59 | *
60 | * @author Chris Banes
61 | */
62 | public class PullToRefreshWebView2 extends PullToRefreshWebView {
63 |
64 | static final String JS_INTERFACE_PKG = "ptr";
65 | static final String DEF_JS_READY_PULL_DOWN_CALL = "javascript:isReadyForPullDown();";
66 | static final String DEF_JS_READY_PULL_UP_CALL = "javascript:isReadyForPullUp();";
67 |
68 | public PullToRefreshWebView2(Context context) {
69 | super(context);
70 | }
71 |
72 | public PullToRefreshWebView2(Context context, AttributeSet attrs) {
73 | super(context, attrs);
74 | }
75 |
76 | public PullToRefreshWebView2(Context context, Mode mode) {
77 | super(context, mode);
78 | }
79 |
80 | private JsValueCallback mJsCallback;
81 | private final AtomicBoolean mIsReadyForPullDown = new AtomicBoolean(false);
82 | private final AtomicBoolean mIsReadyForPullUp = new AtomicBoolean(false);
83 |
84 | @Override
85 | protected WebView createRefreshableView(Context context, AttributeSet attrs) {
86 | WebView webView = super.createRefreshableView(context, attrs);
87 |
88 | // Need to add JS Interface so we can get the response back
89 | mJsCallback = new JsValueCallback();
90 | webView.addJavascriptInterface(mJsCallback, JS_INTERFACE_PKG);
91 |
92 | return webView;
93 | }
94 |
95 | @Override
96 | protected boolean isReadyForPullStart() {
97 | // Call Javascript...
98 | getRefreshableView().loadUrl(DEF_JS_READY_PULL_DOWN_CALL);
99 |
100 | // Response will be given to JsValueCallback, which will update
101 | // mIsReadyForPullDown
102 |
103 | return mIsReadyForPullDown.get();
104 | }
105 |
106 | @Override
107 | protected boolean isReadyForPullEnd() {
108 | // Call Javascript...
109 | getRefreshableView().loadUrl(DEF_JS_READY_PULL_UP_CALL);
110 |
111 | // Response will be given to JsValueCallback, which will update
112 | // mIsReadyForPullUp
113 |
114 | return mIsReadyForPullUp.get();
115 | }
116 |
117 | /**
118 | * Used for response from Javascript
119 | *
120 | * @author Chris Banes
121 | */
122 | final class JsValueCallback {
123 |
124 | public void isReadyForPullUpResponse(boolean response) {
125 | mIsReadyForPullUp.set(response);
126 | }
127 |
128 | public void isReadyForPullDownResponse(boolean response) {
129 | mIsReadyForPullDown.set(response);
130 | }
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/.svn/pristine/06/0619ed95aee5025d6de49b9f182c7ed9e6f2d3bd.svn-base:
--------------------------------------------------------------------------------
1 | package com.handmark.pulltorefresh.library;
2 |
3 | import java.util.HashSet;
4 |
5 | import android.graphics.Typeface;
6 | import android.graphics.drawable.Drawable;
7 |
8 | import com.handmark.pulltorefresh.library.internal.LoadingLayout;
9 |
10 | public class LoadingLayoutProxy implements ILoadingLayout {
11 |
12 | private final HashSet mLoadingLayouts;
13 |
14 | LoadingLayoutProxy() {
15 | mLoadingLayouts = new HashSet();
16 | }
17 |
18 | /**
19 | * This allows you to add extra LoadingLayout instances to this proxy. This
20 | * is only necessary if you keep your own instances, and want to have them
21 | * included in any
22 | * {@link PullToRefreshBase#createLoadingLayoutProxy(boolean, boolean)
23 | * createLoadingLayoutProxy(...)} calls.
24 | *
25 | * @param layout - LoadingLayout to have included.
26 | */
27 | public void addLayout(LoadingLayout layout) {
28 | if (null != layout) {
29 | mLoadingLayouts.add(layout);
30 | }
31 | }
32 |
33 | @Override
34 | public void setLastUpdatedLabel(CharSequence label) {
35 | for (LoadingLayout layout : mLoadingLayouts) {
36 | layout.setLastUpdatedLabel(label);
37 | }
38 | }
39 |
40 | @Override
41 | public void setLoadingDrawable(Drawable drawable) {
42 | for (LoadingLayout layout : mLoadingLayouts) {
43 | layout.setLoadingDrawable(drawable);
44 | }
45 | }
46 |
47 | @Override
48 | public void setRefreshingLabel(CharSequence refreshingLabel) {
49 | for (LoadingLayout layout : mLoadingLayouts) {
50 | layout.setRefreshingLabel(refreshingLabel);
51 | }
52 | }
53 |
54 | @Override
55 | public void setPullLabel(CharSequence label) {
56 | for (LoadingLayout layout : mLoadingLayouts) {
57 | layout.setPullLabel(label);
58 | }
59 | }
60 |
61 | @Override
62 | public void setReleaseLabel(CharSequence label) {
63 | for (LoadingLayout layout : mLoadingLayouts) {
64 | layout.setReleaseLabel(label);
65 | }
66 | }
67 |
68 | public void setTextTypeface(Typeface tf) {
69 | for (LoadingLayout layout : mLoadingLayouts) {
70 | layout.setTextTypeface(tf);
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/.svn/pristine/0a/0a79aa18a3aa4a97e7ec4aa3eb10554a8caec2af.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/0a/0a79aa18a3aa4a97e7ec4aa3eb10554a8caec2af.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/0c/0c4e698e31589f8612d24302909fbf393e07520a.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/0c/0c4e698e31589f8612d24302909fbf393e07520a.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/14/14f3766d558749b48fe3c7ce5c85c52025f07cd1.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/14/14f3766d558749b48fe3c7ce5c85c52025f07cd1.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/15/1581aae9b27449b5ed151373876821b8ce7afeaa.svn-base:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-17
12 | android.library=true
13 | android.library.reference.1=../AndroidStaggeredView-Lib
14 |
--------------------------------------------------------------------------------
/.svn/pristine/1b/1b03f92c7ad2f248c189a7d0bf09b1854e63cd9d.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/1b/1b03f92c7ad2f248c189a7d0bf09b1854e63cd9d.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/22/220a615a14f07f4b7b21cdfd0c697075beb1620f.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/22/220a615a14f07f4b7b21cdfd0c697075beb1620f.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/22/2238428dd649cf3c3689b5835411cea06c015edc.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
17 |
18 |
23 |
24 |
32 |
33 |
34 |
40 |
41 |
48 |
49 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/.svn/pristine/26/2669873f891113a8f45506e825d0215306e95405.svn-base:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/.svn/pristine/2e/2e5728ef780f7892a050664fc5db0759f84ca79a.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.util.AttributeSet;
23 | import android.view.View;
24 | import android.widget.ExpandableListView;
25 |
26 | import com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor;
27 |
28 | public class PullToRefreshExpandableListView extends PullToRefreshAdapterViewBase {
29 |
30 | public PullToRefreshExpandableListView(Context context) {
31 | super(context);
32 | }
33 |
34 | public PullToRefreshExpandableListView(Context context, AttributeSet attrs) {
35 | super(context, attrs);
36 | }
37 |
38 | public PullToRefreshExpandableListView(Context context, Mode mode) {
39 | super(context, mode);
40 | }
41 |
42 | public PullToRefreshExpandableListView(Context context, Mode mode, AnimationStyle style) {
43 | super(context, mode, style);
44 | }
45 |
46 | @Override
47 | public final Orientation getPullToRefreshScrollDirection() {
48 | return Orientation.VERTICAL;
49 | }
50 |
51 | @Override
52 | protected ExpandableListView createRefreshableView(Context context, AttributeSet attrs) {
53 | final ExpandableListView lv;
54 | if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
55 | lv = new InternalExpandableListViewSDK9(context, attrs);
56 | } else {
57 | lv = new InternalExpandableListView(context, attrs);
58 | }
59 |
60 | // Set it to this so it can be used in ListActivity/ListFragment
61 | lv.setId(android.R.id.list);
62 | return lv;
63 | }
64 |
65 | class InternalExpandableListView extends ExpandableListView implements EmptyViewMethodAccessor {
66 |
67 | public InternalExpandableListView(Context context, AttributeSet attrs) {
68 | super(context, attrs);
69 | }
70 |
71 | @Override
72 | public void setEmptyView(View emptyView) {
73 | PullToRefreshExpandableListView.this.setEmptyView(emptyView);
74 | }
75 |
76 | @Override
77 | public void setEmptyViewInternal(View emptyView) {
78 | super.setEmptyView(emptyView);
79 | }
80 | }
81 |
82 | @TargetApi(9)
83 | final class InternalExpandableListViewSDK9 extends InternalExpandableListView {
84 |
85 | public InternalExpandableListViewSDK9(Context context, AttributeSet attrs) {
86 | super(context, attrs);
87 | }
88 |
89 | @Override
90 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX,
91 | int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
92 |
93 | final boolean returnValue = super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX,
94 | scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent);
95 |
96 | // Does all of the hard work...
97 | OverscrollHelper.overScrollBy(PullToRefreshExpandableListView.this, deltaX, scrollX, deltaY, scrollY,
98 | isTouchEvent);
99 |
100 | return returnValue;
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/.svn/pristine/3e/3ed29f2e7fd4d9afa2ec7019b6335efba096be9b.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.internal;
17 |
18 | import android.annotation.SuppressLint;
19 | import android.content.Context;
20 | import android.content.res.TypedArray;
21 | import android.graphics.Matrix;
22 | import android.graphics.drawable.Drawable;
23 | import android.view.View;
24 | import android.view.ViewGroup;
25 | import android.view.animation.Animation;
26 | import android.view.animation.RotateAnimation;
27 | import android.widget.ImageView.ScaleType;
28 |
29 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
30 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Orientation;
31 | import com.handmark.pulltorefresh.library.R;
32 |
33 | @SuppressLint("ViewConstructor")
34 | public class FlipLoadingLayout extends LoadingLayout {
35 |
36 | static final int FLIP_ANIMATION_DURATION = 150;
37 |
38 | private final Animation mRotateAnimation, mResetRotateAnimation;
39 |
40 | public FlipLoadingLayout(Context context, final Mode mode, final Orientation scrollDirection, TypedArray attrs) {
41 | super(context, mode, scrollDirection, attrs);
42 |
43 | final int rotateAngle = mode == Mode.PULL_FROM_START ? -180 : 180;
44 |
45 | mRotateAnimation = new RotateAnimation(0, rotateAngle, Animation.RELATIVE_TO_SELF, 0.5f,
46 | Animation.RELATIVE_TO_SELF, 0.5f);
47 | mRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
48 | mRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
49 | mRotateAnimation.setFillAfter(true);
50 |
51 | mResetRotateAnimation = new RotateAnimation(rotateAngle, 0, Animation.RELATIVE_TO_SELF, 0.5f,
52 | Animation.RELATIVE_TO_SELF, 0.5f);
53 | mResetRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
54 | mResetRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
55 | mResetRotateAnimation.setFillAfter(true);
56 | }
57 |
58 | @Override
59 | protected void onLoadingDrawableSet(Drawable imageDrawable) {
60 | if (null != imageDrawable) {
61 | final int dHeight = imageDrawable.getIntrinsicHeight();
62 | final int dWidth = imageDrawable.getIntrinsicWidth();
63 |
64 | /**
65 | * We need to set the width/height of the ImageView so that it is
66 | * square with each side the size of the largest drawable dimension.
67 | * This is so that it doesn't clip when rotated.
68 | */
69 | ViewGroup.LayoutParams lp = mHeaderImage.getLayoutParams();
70 | lp.width = lp.height = Math.max(dHeight, dWidth);
71 | mHeaderImage.requestLayout();
72 |
73 | /**
74 | * We now rotate the Drawable so that is at the correct rotation,
75 | * and is centered.
76 | */
77 | mHeaderImage.setScaleType(ScaleType.MATRIX);
78 | Matrix matrix = new Matrix();
79 | matrix.postTranslate((lp.width - dWidth) / 2f, (lp.height - dHeight) / 2f);
80 | matrix.postRotate(getDrawableRotationAngle(), lp.width / 2f, lp.height / 2f);
81 | mHeaderImage.setImageMatrix(matrix);
82 | }
83 | }
84 |
85 | @Override
86 | protected void onPullImpl(float scaleOfLayout) {
87 | // NO-OP
88 | }
89 |
90 | @Override
91 | protected void pullToRefreshImpl() {
92 | // Only start reset Animation, we've previously show the rotate anim
93 | if (mRotateAnimation == mHeaderImage.getAnimation()) {
94 | mHeaderImage.startAnimation(mResetRotateAnimation);
95 | }
96 | }
97 |
98 | @Override
99 | protected void refreshingImpl() {
100 | mHeaderImage.clearAnimation();
101 | mHeaderImage.setVisibility(View.INVISIBLE);
102 | mHeaderProgress.setVisibility(View.VISIBLE);
103 | }
104 |
105 | @Override
106 | protected void releaseToRefreshImpl() {
107 | mHeaderImage.startAnimation(mRotateAnimation);
108 | }
109 |
110 | @Override
111 | protected void resetImpl() {
112 | mHeaderImage.clearAnimation();
113 | mHeaderProgress.setVisibility(View.GONE);
114 | mHeaderImage.setVisibility(View.VISIBLE);
115 | }
116 |
117 | @Override
118 | protected int getDefaultDrawableResId() {
119 | return R.drawable.default_ptr_flip;
120 | }
121 |
122 | private float getDrawableRotationAngle() {
123 | float angle = 0f;
124 | switch (mMode) {
125 | case PULL_FROM_END:
126 | if (mScrollDirection == Orientation.HORIZONTAL) {
127 | angle = 90f;
128 | } else {
129 | angle = 180f;
130 | }
131 | break;
132 |
133 | case PULL_FROM_START:
134 | if (mScrollDirection == Orientation.HORIZONTAL) {
135 | angle = 270f;
136 | }
137 | break;
138 |
139 | default:
140 | break;
141 | }
142 |
143 | return angle;
144 | }
145 |
146 | }
147 |
--------------------------------------------------------------------------------
/.svn/pristine/40/40d7d87db8715e1eab4762172c5e18574a364460.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.util.AttributeSet;
23 | import android.view.View;
24 | import android.widget.GridView;
25 |
26 | import com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor;
27 |
28 | public class PullToRefreshGridView extends PullToRefreshAdapterViewBase {
29 |
30 | public PullToRefreshGridView(Context context) {
31 | super(context);
32 | }
33 |
34 | public PullToRefreshGridView(Context context, AttributeSet attrs) {
35 | super(context, attrs);
36 | }
37 |
38 | public PullToRefreshGridView(Context context, Mode mode) {
39 | super(context, mode);
40 | }
41 |
42 | public PullToRefreshGridView(Context context, Mode mode, AnimationStyle style) {
43 | super(context, mode, style);
44 | }
45 |
46 | @Override
47 | public final Orientation getPullToRefreshScrollDirection() {
48 | return Orientation.VERTICAL;
49 | }
50 |
51 | @Override
52 | protected final GridView createRefreshableView(Context context, AttributeSet attrs) {
53 | final GridView gv;
54 | if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
55 | gv = new InternalGridViewSDK9(context, attrs);
56 | } else {
57 | gv = new InternalGridView(context, attrs);
58 | }
59 |
60 | // Use Generated ID (from res/values/ids.xml)
61 | gv.setId(R.id.gridview);
62 | return gv;
63 | }
64 |
65 | class InternalGridView extends GridView implements EmptyViewMethodAccessor {
66 |
67 | public InternalGridView(Context context, AttributeSet attrs) {
68 | super(context, attrs);
69 | }
70 |
71 | @Override
72 | public void setEmptyView(View emptyView) {
73 | PullToRefreshGridView.this.setEmptyView(emptyView);
74 | }
75 |
76 | @Override
77 | public void setEmptyViewInternal(View emptyView) {
78 | super.setEmptyView(emptyView);
79 | }
80 | }
81 |
82 | @TargetApi(9)
83 | final class InternalGridViewSDK9 extends InternalGridView {
84 |
85 | public InternalGridViewSDK9(Context context, AttributeSet attrs) {
86 | super(context, attrs);
87 | }
88 |
89 | @Override
90 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX,
91 | int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
92 |
93 | final boolean returnValue = super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX,
94 | scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent);
95 |
96 | // Does all of the hard work...
97 | OverscrollHelper.overScrollBy(PullToRefreshGridView.this, deltaX, scrollX, deltaY, scrollY, isTouchEvent);
98 |
99 | return returnValue;
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/.svn/pristine/43/43466c0e948ad95cd5f402a9a62f730aba9665a7.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.internal;
17 |
18 | import android.view.View;
19 |
20 | /**
21 | * Interface that allows PullToRefreshBase to hijack the call to
22 | * AdapterView.setEmptyView()
23 | *
24 | * @author chris
25 | */
26 | public interface EmptyViewMethodAccessor {
27 |
28 | /**
29 | * Calls upto AdapterView.setEmptyView()
30 | *
31 | * @param emptyView - to set as Empty View
32 | */
33 | public void setEmptyViewInternal(View emptyView);
34 |
35 | /**
36 | * Should call PullToRefreshBase.setEmptyView() which will then
37 | * automatically call through to setEmptyViewInternal()
38 | *
39 | * @param emptyView - to set as Empty View
40 | */
41 | public void setEmptyView(View emptyView);
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/.svn/pristine/4c/4ccefa133be54c9bc35ce12607f292af4f0d94f3.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/4c/4ccefa133be54c9bc35ce12607f292af4f0d94f3.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/50/5044abc2544992cd3c5d38e41481aba7549d6a01.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/.svn/pristine/55/55d1983d9ecd6a8681fd704b1e767c3a2fc8769e.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/55/55d1983d9ecd6a8681fd704b1e767c3a2fc8769e.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/56/56daec2a780f7f0c21b2657fb659a6d592698eae.svn-base:
--------------------------------------------------------------------------------
1 | package com.handmark.pulltorefresh.library;
2 |
3 | import android.graphics.Typeface;
4 | import android.graphics.drawable.Drawable;
5 |
6 | public interface ILoadingLayout {
7 |
8 | /**
9 | * Set the Last Updated Text. This displayed under the main label when
10 | * Pulling
11 | *
12 | * @param label - Label to set
13 | */
14 | public void setLastUpdatedLabel(CharSequence label);
15 |
16 | /**
17 | * Set the drawable used in the loading layout. This is the same as calling
18 | * setLoadingDrawable(drawable, Mode.BOTH)
19 | *
20 | * @param drawable - Drawable to display
21 | */
22 | public void setLoadingDrawable(Drawable drawable);
23 |
24 | /**
25 | * Set Text to show when the Widget is being Pulled
26 | * setPullLabel(releaseLabel, Mode.BOTH)
27 | *
28 | * @param pullLabel - CharSequence to display
29 | */
30 | public void setPullLabel(CharSequence pullLabel);
31 |
32 | /**
33 | * Set Text to show when the Widget is refreshing
34 | * setRefreshingLabel(releaseLabel, Mode.BOTH)
35 | *
36 | * @param refreshingLabel - CharSequence to display
37 | */
38 | public void setRefreshingLabel(CharSequence refreshingLabel);
39 |
40 | /**
41 | * Set Text to show when the Widget is being pulled, and will refresh when
42 | * released. This is the same as calling
43 | * setReleaseLabel(releaseLabel, Mode.BOTH)
44 | *
45 | * @param releaseLabel - CharSequence to display
46 | */
47 | public void setReleaseLabel(CharSequence releaseLabel);
48 |
49 | /**
50 | * Set's the Sets the typeface and style in which the text should be
51 | * displayed. Please see
52 | * {@link android.widget.TextView#setTypeface(Typeface)
53 | * TextView#setTypeface(Typeface)}.
54 | */
55 | public void setTextTypeface(Typeface tf);
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/.svn/pristine/59/59b08cc1a7fb8d465f7c2ecc490a279f896a6c0e.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/59/59b08cc1a7fb8d465f7c2ecc490a279f896a6c0e.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/5a/5a978353722590218a9d6f98618fde0ca3f40112.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
17 |
18 |
--------------------------------------------------------------------------------
/.svn/pristine/5b/5b566ecf33c4dfb9fbe323d2697ad547a837a65e.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/5b/5b566ecf33c4dfb9fbe323d2697ad547a837a65e.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/6a/6a64226af25472cfdbea23fd226e03698b364a96.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.svn/pristine/6f/6f54caa883ef098511ce6cfd48bcf6b24f2d095c.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.internal;
17 |
18 | import android.content.Context;
19 | import android.content.res.TypedArray;
20 | import android.graphics.Matrix;
21 | import android.graphics.drawable.Drawable;
22 | import android.view.animation.Animation;
23 | import android.view.animation.RotateAnimation;
24 | import android.widget.ImageView.ScaleType;
25 |
26 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
27 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Orientation;
28 | import com.handmark.pulltorefresh.library.R;
29 |
30 | public class RotateLoadingLayout extends LoadingLayout {
31 |
32 | static final int ROTATION_ANIMATION_DURATION = 1200;
33 |
34 | private final Animation mRotateAnimation;
35 | private final Matrix mHeaderImageMatrix;
36 |
37 | private float mRotationPivotX, mRotationPivotY;
38 |
39 | private final boolean mRotateDrawableWhilePulling;
40 |
41 | public RotateLoadingLayout(Context context, Mode mode, Orientation scrollDirection, TypedArray attrs) {
42 | super(context, mode, scrollDirection, attrs);
43 |
44 | mRotateDrawableWhilePulling = attrs.getBoolean(R.styleable.PullToRefresh_ptrRotateDrawableWhilePulling, true);
45 |
46 | mHeaderImage.setScaleType(ScaleType.MATRIX);
47 | mHeaderImageMatrix = new Matrix();
48 | mHeaderImage.setImageMatrix(mHeaderImageMatrix);
49 |
50 | mRotateAnimation = new RotateAnimation(0, 720, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
51 | 0.5f);
52 | mRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
53 | mRotateAnimation.setDuration(ROTATION_ANIMATION_DURATION);
54 | mRotateAnimation.setRepeatCount(Animation.INFINITE);
55 | mRotateAnimation.setRepeatMode(Animation.RESTART);
56 | }
57 |
58 | public void onLoadingDrawableSet(Drawable imageDrawable) {
59 | if (null != imageDrawable) {
60 | mRotationPivotX = Math.round(imageDrawable.getIntrinsicWidth() / 2f);
61 | mRotationPivotY = Math.round(imageDrawable.getIntrinsicHeight() / 2f);
62 | }
63 | }
64 |
65 | protected void onPullImpl(float scaleOfLayout) {
66 | float angle;
67 | if (mRotateDrawableWhilePulling) {
68 | angle = scaleOfLayout * 90f;
69 | } else {
70 | angle = Math.max(0f, Math.min(180f, scaleOfLayout * 360f - 180f));
71 | }
72 |
73 | mHeaderImageMatrix.setRotate(angle, mRotationPivotX, mRotationPivotY);
74 | mHeaderImage.setImageMatrix(mHeaderImageMatrix);
75 | }
76 |
77 | @Override
78 | protected void refreshingImpl() {
79 | mHeaderImage.startAnimation(mRotateAnimation);
80 | }
81 |
82 | @Override
83 | protected void resetImpl() {
84 | mHeaderImage.clearAnimation();
85 | resetImageRotation();
86 | }
87 |
88 | private void resetImageRotation() {
89 | if (null != mHeaderImageMatrix) {
90 | mHeaderImageMatrix.reset();
91 | mHeaderImage.setImageMatrix(mHeaderImageMatrix);
92 | }
93 | }
94 |
95 | @Override
96 | protected void pullToRefreshImpl() {
97 | // NO-OP
98 | }
99 |
100 | @Override
101 | protected void releaseToRefreshImpl() {
102 | // NO-OP
103 | }
104 |
105 | @Override
106 | protected int getDefaultDrawableResId() {
107 | return R.drawable.image_loading;
108 | }
109 |
110 | }
111 |
--------------------------------------------------------------------------------
/.svn/pristine/73/73c954abc763402d35ea0c2ff879265cabe6b2be.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/73/73c954abc763402d35ea0c2ff879265cabe6b2be.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/76/76b02041628cc3032007b979c1ee546dc36df382.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.internal;
17 |
18 | import android.annotation.SuppressLint;
19 | import android.content.Context;
20 | import android.graphics.Matrix;
21 | import android.graphics.drawable.Drawable;
22 | import android.view.View;
23 | import android.view.animation.Animation;
24 | import android.view.animation.Animation.AnimationListener;
25 | import android.view.animation.AnimationUtils;
26 | import android.view.animation.Interpolator;
27 | import android.view.animation.LinearInterpolator;
28 | import android.view.animation.RotateAnimation;
29 | import android.widget.FrameLayout;
30 | import android.widget.ImageView;
31 | import android.widget.ImageView.ScaleType;
32 |
33 | import com.handmark.pulltorefresh.library.PullToRefreshBase;
34 | import com.handmark.pulltorefresh.library.R;
35 |
36 | @SuppressLint("ViewConstructor")
37 | public class IndicatorLayout extends FrameLayout implements AnimationListener {
38 |
39 | static final int DEFAULT_ROTATION_ANIMATION_DURATION = 150;
40 |
41 | private Animation mInAnim, mOutAnim;
42 | private ImageView mArrowImageView;
43 |
44 | private final Animation mRotateAnimation, mResetRotateAnimation;
45 |
46 | public IndicatorLayout(Context context, PullToRefreshBase.Mode mode) {
47 | super(context);
48 | mArrowImageView = new ImageView(context);
49 |
50 | Drawable arrowD = getResources().getDrawable(R.drawable.indicator_arrow);
51 | mArrowImageView.setImageDrawable(arrowD);
52 |
53 | final int padding = getResources().getDimensionPixelSize(R.dimen.indicator_internal_padding);
54 | mArrowImageView.setPadding(padding, padding, padding, padding);
55 | addView(mArrowImageView);
56 |
57 | int inAnimResId, outAnimResId;
58 | switch (mode) {
59 | case PULL_FROM_END:
60 | inAnimResId = R.anim.slide_in_from_bottom;
61 | outAnimResId = R.anim.slide_out_to_bottom;
62 | setBackgroundResource(R.drawable.indicator_bg_bottom);
63 |
64 | // Rotate Arrow so it's pointing the correct way
65 | mArrowImageView.setScaleType(ScaleType.MATRIX);
66 | Matrix matrix = new Matrix();
67 | matrix.setRotate(180f, arrowD.getIntrinsicWidth() / 2f, arrowD.getIntrinsicHeight() / 2f);
68 | mArrowImageView.setImageMatrix(matrix);
69 | break;
70 | default:
71 | case PULL_FROM_START:
72 | inAnimResId = R.anim.slide_in_from_top;
73 | outAnimResId = R.anim.slide_out_to_top;
74 | setBackgroundResource(R.drawable.indicator_bg_top);
75 | break;
76 | }
77 |
78 | mInAnim = AnimationUtils.loadAnimation(context, inAnimResId);
79 | mInAnim.setAnimationListener(this);
80 |
81 | mOutAnim = AnimationUtils.loadAnimation(context, outAnimResId);
82 | mOutAnim.setAnimationListener(this);
83 |
84 | final Interpolator interpolator = new LinearInterpolator();
85 | mRotateAnimation = new RotateAnimation(0, -180, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
86 | 0.5f);
87 | mRotateAnimation.setInterpolator(interpolator);
88 | mRotateAnimation.setDuration(DEFAULT_ROTATION_ANIMATION_DURATION);
89 | mRotateAnimation.setFillAfter(true);
90 |
91 | mResetRotateAnimation = new RotateAnimation(-180, 0, Animation.RELATIVE_TO_SELF, 0.5f,
92 | Animation.RELATIVE_TO_SELF, 0.5f);
93 | mResetRotateAnimation.setInterpolator(interpolator);
94 | mResetRotateAnimation.setDuration(DEFAULT_ROTATION_ANIMATION_DURATION);
95 | mResetRotateAnimation.setFillAfter(true);
96 |
97 | }
98 |
99 | public final boolean isVisible() {
100 | Animation currentAnim = getAnimation();
101 | if (null != currentAnim) {
102 | return mInAnim == currentAnim;
103 | }
104 |
105 | return getVisibility() == View.VISIBLE;
106 | }
107 |
108 | public void hide() {
109 | startAnimation(mOutAnim);
110 | }
111 |
112 | public void show() {
113 | mArrowImageView.clearAnimation();
114 | startAnimation(mInAnim);
115 | }
116 |
117 | @Override
118 | public void onAnimationEnd(Animation animation) {
119 | if (animation == mOutAnim) {
120 | mArrowImageView.clearAnimation();
121 | setVisibility(View.GONE);
122 | } else if (animation == mInAnim) {
123 | setVisibility(View.VISIBLE);
124 | }
125 |
126 | clearAnimation();
127 | }
128 |
129 | @Override
130 | public void onAnimationRepeat(Animation animation) {
131 | // NO-OP
132 | }
133 |
134 | @Override
135 | public void onAnimationStart(Animation animation) {
136 | setVisibility(View.VISIBLE);
137 | }
138 |
139 | public void releaseToRefresh() {
140 | mArrowImageView.startAnimation(mRotateAnimation);
141 | }
142 |
143 | public void pullToRefresh() {
144 | mArrowImageView.startAnimation(mResetRotateAnimation);
145 | }
146 |
147 | }
148 |
--------------------------------------------------------------------------------
/.svn/pristine/77/77dfc1ff919d65721e6eaa085d529f7bb84e83fa.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/77/77dfc1ff919d65721e6eaa085d529f7bb84e83fa.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/7c/7c7ca7d5d770d74cdca32a0de47cfcc42f2baf49.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.svn/pristine/7d/7d9c566fdb67fdbe66cac1abba4ae539e75e8be7.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.internal;
17 |
18 | import android.annotation.TargetApi;
19 | import android.graphics.drawable.Drawable;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.view.View;
23 |
24 | @SuppressWarnings("deprecation")
25 | public class ViewCompat {
26 |
27 | public static void postOnAnimation(View view, Runnable runnable) {
28 | if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
29 | SDK16.postOnAnimation(view, runnable);
30 | } else {
31 | view.postDelayed(runnable, 16);
32 | }
33 | }
34 |
35 | public static void setBackground(View view, Drawable background) {
36 | if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
37 | SDK16.setBackground(view, background);
38 | } else {
39 | view.setBackgroundDrawable(background);
40 | }
41 | }
42 |
43 | public static void setLayerType(View view, int layerType) {
44 | if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
45 | SDK11.setLayerType(view, layerType);
46 | }
47 | }
48 |
49 | @TargetApi(11)
50 | static class SDK11 {
51 |
52 | public static void setLayerType(View view, int layerType) {
53 | view.setLayerType(layerType, null);
54 | }
55 | }
56 |
57 | @TargetApi(16)
58 | static class SDK16 {
59 |
60 | public static void postOnAnimation(View view, Runnable runnable) {
61 | view.postOnAnimation(runnable);
62 | }
63 |
64 | public static void setBackground(View view, Drawable background) {
65 | view.setBackground(background);
66 | }
67 |
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/.svn/pristine/7e/7e7631515569e4e1c0d2299a109b7dc1f9f896e2.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
--------------------------------------------------------------------------------
/.svn/pristine/7e/7ed59ff5c7eeef35ac5505e2f48250f034546815.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/7e/7ed59ff5c7eeef35ac5505e2f48250f034546815.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/85/8528d92d3d2467b4419a457b6b5839ea6aa71e52.svn-base:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-19
12 | android.library=true
13 | android.library.reference.1=../AndroidStaggeredView-Lib
14 |
--------------------------------------------------------------------------------
/.svn/pristine/89/890f09fe55be132a8314ad62d372980e208e4ee2.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/89/890f09fe55be132a8314ad62d372980e208e4ee2.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/8c/8c958dbc5d25b2bd5f48c3187f527d2afe7734a5.svn-base:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-19
12 | android.library=true
13 |
--------------------------------------------------------------------------------
/.svn/pristine/90/90c96ccdc91b6f0f8e91a8ca9e4e206599f962a3.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/90/90c96ccdc91b6f0f8e91a8ca9e4e206599f962a3.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/92/921724f79580b7061eabce53cf981d4b6a63b57d.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 10dp
5 | 12dp
6 | 4dp
7 | 24dp
8 | 12dp
9 | 0dp
10 |
11 |
--------------------------------------------------------------------------------
/.svn/pristine/92/92d06604fb0a420fa9bce91ec8eb2a6db2f31efd.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.extras;
17 |
18 | import java.util.HashMap;
19 |
20 | import android.content.Context;
21 | import android.media.MediaPlayer;
22 | import android.view.View;
23 |
24 | import com.handmark.pulltorefresh.library.PullToRefreshBase;
25 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
26 | import com.handmark.pulltorefresh.library.PullToRefreshBase.State;
27 |
28 | public class SoundPullEventListener implements PullToRefreshBase.OnPullEventListener {
29 |
30 | private final Context mContext;
31 | private final HashMap mSoundMap;
32 |
33 | private MediaPlayer mCurrentMediaPlayer;
34 |
35 | /**
36 | * Constructor
37 | *
38 | * @param context - Context
39 | */
40 | public SoundPullEventListener(Context context) {
41 | mContext = context;
42 | mSoundMap = new HashMap();
43 | }
44 |
45 | @Override
46 | public final void onPullEvent(PullToRefreshBase refreshView, State event, Mode direction) {
47 | Integer soundResIdObj = mSoundMap.get(event);
48 | if (null != soundResIdObj) {
49 | playSound(soundResIdObj.intValue());
50 | }
51 | }
52 |
53 | /**
54 | * Set the Sounds to be played when a Pull Event happens. You specify which
55 | * sound plays for which events by calling this method multiple times for
56 | * each event.
57 | *
58 | * If you've already set a sound for a certain event, and add another sound
59 | * for that event, only the new sound will be played.
60 | *
61 | * @param event - The event for which the sound will be played.
62 | * @param resId - Resource Id of the sound file to be played (e.g.
63 | * R.raw.pull_sound)
64 | */
65 | public void addSoundEvent(State event, int resId) {
66 | mSoundMap.put(event, resId);
67 | }
68 |
69 | /**
70 | * Clears all of the previously set sounds and events.
71 | */
72 | public void clearSounds() {
73 | mSoundMap.clear();
74 | }
75 |
76 | /**
77 | * Gets the current (or last) MediaPlayer instance.
78 | */
79 | public MediaPlayer getCurrentMediaPlayer() {
80 | return mCurrentMediaPlayer;
81 | }
82 |
83 | private void playSound(int resId) {
84 | // Stop current player, if there's one playing
85 | if (null != mCurrentMediaPlayer) {
86 | mCurrentMediaPlayer.stop();
87 | mCurrentMediaPlayer.release();
88 | }
89 |
90 | mCurrentMediaPlayer = MediaPlayer.create(mContext, resId);
91 | if (null != mCurrentMediaPlayer) {
92 | mCurrentMediaPlayer.start();
93 | }
94 | }
95 |
96 | }
97 |
--------------------------------------------------------------------------------
/.svn/pristine/97/9743c744a5bde88262c3100b65ea2950a0afcfe4.svn-base:
--------------------------------------------------------------------------------
1 | int anim slide_in_from_bottom 0x7f040000
2 | int anim slide_in_from_top 0x7f040001
3 | int anim slide_out_to_bottom 0x7f040002
4 | int anim slide_out_to_top 0x7f040003
5 | int attr ptrAdapterViewBackground 0x7f010010
6 | int attr ptrAnimationStyle 0x7f01000c
7 | int attr ptrDrawable 0x7f010006
8 | int attr ptrDrawableBottom 0x7f010012
9 | int attr ptrDrawableEnd 0x7f010008
10 | int attr ptrDrawableStart 0x7f010007
11 | int attr ptrDrawableTop 0x7f010011
12 | int attr ptrHeaderBackground 0x7f010001
13 | int attr ptrHeaderSubTextColor 0x7f010003
14 | int attr ptrHeaderTextAppearance 0x7f01000a
15 | int attr ptrHeaderTextColor 0x7f010002
16 | int attr ptrListViewExtrasEnabled 0x7f01000e
17 | int attr ptrMode 0x7f010004
18 | int attr ptrOverScroll 0x7f010009
19 | int attr ptrRefreshableViewBackground 0x7f010000
20 | int attr ptrRotateDrawableWhilePulling 0x7f01000f
21 | int attr ptrScrollingWhileRefreshingEnabled 0x7f01000d
22 | int attr ptrShowIndicator 0x7f010005
23 | int attr ptrSubHeaderTextAppearance 0x7f01000b
24 | int dimen header_footer_bottom_padding 0x7f060005
25 | int dimen header_footer_left_right_padding 0x7f060003
26 | int dimen header_footer_top_padding 0x7f060004
27 | int dimen indicator_corner_radius 0x7f060001
28 | int dimen indicator_internal_padding 0x7f060002
29 | int dimen indicator_right_padding 0x7f060000
30 | int drawable default_ptr_flip 0x7f020000
31 | int drawable default_ptr_rotate 0x7f020001
32 | int drawable image_loading 0x7f020002
33 | int drawable indicator_arrow 0x7f020003
34 | int drawable indicator_bg_bottom 0x7f020004
35 | int drawable indicator_bg_top 0x7f020005
36 | int drawable loading1 0x7f020006
37 | int drawable loading2 0x7f020007
38 | int id both 0x7f050003
39 | int id disabled 0x7f050000
40 | int id fl_inner 0x7f05000c
41 | int id flip 0x7f050008
42 | int id gridview 0x7f050009
43 | int id manualOnly 0x7f050004
44 | int id pullDownFromTop 0x7f050005
45 | int id pullFromEnd 0x7f050002
46 | int id pullFromStart 0x7f050001
47 | int id pullUpFromBottom 0x7f050006
48 | int id pull_to_refresh_image 0x7f05000d
49 | int id pull_to_refresh_progress 0x7f05000e
50 | int id pull_to_refresh_sub_text 0x7f050010
51 | int id pull_to_refresh_text 0x7f05000f
52 | int id rotate 0x7f050007
53 | int id scrollview 0x7f05000b
54 | int id webview 0x7f05000a
55 | int layout pull_to_refresh_header_horizontal 0x7f030000
56 | int layout pull_to_refresh_header_vertical 0x7f030001
57 | int string pull_to_refresh_from_bottom_pull_label 0x7f070003
58 | int string pull_to_refresh_from_bottom_refreshing_label 0x7f070005
59 | int string pull_to_refresh_from_bottom_release_label 0x7f070004
60 | int string pull_to_refresh_pull_label 0x7f070000
61 | int string pull_to_refresh_refreshing_label 0x7f070002
62 | int string pull_to_refresh_release_label 0x7f070001
63 | int[] styleable PullToRefresh { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012 }
64 | int styleable PullToRefresh_ptrAdapterViewBackground 16
65 | int styleable PullToRefresh_ptrAnimationStyle 12
66 | int styleable PullToRefresh_ptrDrawable 6
67 | int styleable PullToRefresh_ptrDrawableBottom 18
68 | int styleable PullToRefresh_ptrDrawableEnd 8
69 | int styleable PullToRefresh_ptrDrawableStart 7
70 | int styleable PullToRefresh_ptrDrawableTop 17
71 | int styleable PullToRefresh_ptrHeaderBackground 1
72 | int styleable PullToRefresh_ptrHeaderSubTextColor 3
73 | int styleable PullToRefresh_ptrHeaderTextAppearance 10
74 | int styleable PullToRefresh_ptrHeaderTextColor 2
75 | int styleable PullToRefresh_ptrListViewExtrasEnabled 14
76 | int styleable PullToRefresh_ptrMode 4
77 | int styleable PullToRefresh_ptrOverScroll 9
78 | int styleable PullToRefresh_ptrRefreshableViewBackground 0
79 | int styleable PullToRefresh_ptrRotateDrawableWhilePulling 15
80 | int styleable PullToRefresh_ptrScrollingWhileRefreshingEnabled 13
81 | int styleable PullToRefresh_ptrShowIndicator 5
82 | int styleable PullToRefresh_ptrSubHeaderTextAppearance 11
83 |
--------------------------------------------------------------------------------
/.svn/pristine/98/98d53fcce697e8b40e6a664996fcbe581b4af04f.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/98/98d53fcce697e8b40e6a664996fcbe581b4af04f.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/9d/9d5224b362e03b6c8bdd4179cf91bc7a750e69f9.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/9d/9d5224b362e03b6c8bdd4179cf91bc7a750e69f9.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/a2/a2a50171be27512e43e52225b06dc8d2538bc1bd.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.svn/pristine/a3/a396b072ee70577a67f05e9a3e191e6b53027175.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.svn/pristine/a6/a6ac7c001a25836cd15c917b3c4ca7f292dcb755.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
17 |
18 |
23 |
24 |
32 |
33 |
34 |
40 |
41 |
48 |
49 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/.svn/pristine/a8/a8871fcf8fa9c6d6bd0236d538f89f4772004995.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
--------------------------------------------------------------------------------
/.svn/pristine/a8/a8ea5050fa418cec8d5a20b1f82bc195dd405d3f.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/a8/a8ea5050fa418cec8d5a20b1f82bc195dd405d3f.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/aa/aa043338af5d6a0edd71719feeb03328aaa660a4.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/aa/aa043338af5d6a0edd71719feeb03328aaa660a4.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/b0/b0950cb3cf610eeb259f55e8e5b6c9eb6b1d4018.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/b0/b0950cb3cf610eeb259f55e8e5b6c9eb6b1d4018.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/b5/b5d3d6f0ac5c1cb285ba3a232c08e1287c403542.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
49 |
50 |
51 |
52 |
56 |
57 |
69 |
70 |
71 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/.svn/pristine/b7/b7f116371e4a0934ee462f59f5978ad1628835ec.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/b7/b7f116371e4a0934ee462f59f5978ad1628835ec.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/b9/b92de2f7e58729d2c04950de2a177d44b9d0c156.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.util.AttributeSet;
23 | import android.view.View;
24 | import android.widget.ScrollView;
25 |
26 | public class PullToRefreshScrollView extends PullToRefreshBase {
27 |
28 | public PullToRefreshScrollView(Context context) {
29 | super(context);
30 | }
31 |
32 | public PullToRefreshScrollView(Context context, AttributeSet attrs) {
33 | super(context, attrs);
34 | }
35 |
36 | public PullToRefreshScrollView(Context context, Mode mode) {
37 | super(context, mode);
38 | }
39 |
40 | public PullToRefreshScrollView(Context context, Mode mode, AnimationStyle style) {
41 | super(context, mode, style);
42 | }
43 |
44 | @Override
45 | public final Orientation getPullToRefreshScrollDirection() {
46 | return Orientation.VERTICAL;
47 | }
48 |
49 | @Override
50 | protected ScrollView createRefreshableView(Context context, AttributeSet attrs) {
51 | ScrollView scrollView;
52 | if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
53 | scrollView = new InternalScrollViewSDK9(context, attrs);
54 | } else {
55 | scrollView = new ScrollView(context, attrs);
56 | }
57 |
58 | scrollView.setId(R.id.scrollview);
59 | return scrollView;
60 | }
61 |
62 | @Override
63 | protected boolean isReadyForPullStart() {
64 | return mRefreshableView.getScrollY() == 0;
65 | }
66 |
67 | @Override
68 | protected boolean isReadyForPullEnd() {
69 | View scrollViewChild = mRefreshableView.getChildAt(0);
70 | if (null != scrollViewChild) {
71 | return mRefreshableView.getScrollY() >= (scrollViewChild.getHeight() - getHeight());
72 | }
73 | return false;
74 | }
75 |
76 | @TargetApi(9)
77 | final class InternalScrollViewSDK9 extends ScrollView {
78 |
79 | public InternalScrollViewSDK9(Context context, AttributeSet attrs) {
80 | super(context, attrs);
81 | }
82 |
83 | @Override
84 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX,
85 | int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
86 |
87 | final boolean returnValue = super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX,
88 | scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent);
89 |
90 | // Does all of the hard work...
91 | OverscrollHelper.overScrollBy(PullToRefreshScrollView.this, deltaX, scrollX, deltaY, scrollY,
92 | getScrollRange(), isTouchEvent);
93 |
94 | return returnValue;
95 | }
96 |
97 | /**
98 | * Taken from the AOSP ScrollView source
99 | */
100 | private int getScrollRange() {
101 | int scrollRange = 0;
102 | if (getChildCount() > 0) {
103 | View child = getChildAt(0);
104 | scrollRange = Math.max(0, child.getHeight() - (getHeight() - getPaddingBottom() - getPaddingTop()));
105 | }
106 | return scrollRange;
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/.svn/pristine/ba/ba6e0026fe5aa484919de36d6e1f162cb9296515.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/ba/ba6e0026fe5aa484919de36d6e1f162cb9296515.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/ba/badca346bab97fafbc176381e69cd2ecedf5d7e0.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/ba/badca346bab97fafbc176381e69cd2ecedf5d7e0.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/be/be5ba4b2f13c0f653bd0bb67e6aec92bdafa1d15.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 10dp
5 | 12dp
6 | 4dp
7 | 24dp
8 | 8dp
9 | 0dp
10 |
11 |
--------------------------------------------------------------------------------
/.svn/pristine/c9/c9fee69739681a87a4f6cdd12d16dfb9a8319622.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/c9/c9fee69739681a87a4f6cdd12d16dfb9a8319622.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/ca/caee00c23c74004c1b738d16bdde86e7f03f8f71.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
--------------------------------------------------------------------------------
/.svn/pristine/cd/cd745f97cd7c31531f7ea497eac15075104e3c74.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/cd/cd745f97cd7c31531f7ea497eac15075104e3c74.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/d0/d07c8115541fcdad2b4452db7ee345ba693a8b2b.svn-base:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 |
7 | # location of the SDK. This is only used by Ant
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=/Users/harry/develop/adt-bundle-mac-x86_64-20131030/sdk
11 |
--------------------------------------------------------------------------------
/.svn/pristine/d0/d0e7ea106347bd70950420f5736cf1e1cbc9f160.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/d0/d0e7ea106347bd70950420f5736cf1e1cbc9f160.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/d6/d678897728ca4fe8acf750aa03e0acbe138f9122.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/d6/d678897728ca4fe8acf750aa03e0acbe138f9122.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/d7/d7310c85da93146187316796a0358a5d513db205.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
18 |
19 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/.svn/pristine/db/db05693137c654fcf559046a295b4042bb83bfa2.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 下拉刷新…
5 | 松开刷新…
6 | 努力加载中…
7 |
8 |
9 | 上拉加载更多
10 | 松开加载…
11 | 努力加载中…
12 |
13 |
--------------------------------------------------------------------------------
/.svn/pristine/db/dba535818d6f67c4f23abd5467c35f085a3dbc4b.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/db/dba535818d6f67c4f23abd5467c35f085a3dbc4b.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/e5/e5f8612a77399ec5c5a3ea8dd1ed841a6c76a0e8.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/e5/e5f8612a77399ec5c5a3ea8dd1ed841a6c76a0e8.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/e9/e92f5397b8a07cc1d6de098942c2ded51f043603.svn-base:
--------------------------------------------------------------------------------
1 | int anim slide_in_from_bottom 0x7f040000
2 | int anim slide_in_from_top 0x7f040001
3 | int anim slide_out_to_bottom 0x7f040002
4 | int anim slide_out_to_top 0x7f040003
5 | int attr ptrAdapterViewBackground 0x7f010010
6 | int attr ptrAnimationStyle 0x7f01000c
7 | int attr ptrDrawable 0x7f010006
8 | int attr ptrDrawableBottom 0x7f010012
9 | int attr ptrDrawableEnd 0x7f010008
10 | int attr ptrDrawableStart 0x7f010007
11 | int attr ptrDrawableTop 0x7f010011
12 | int attr ptrHeaderBackground 0x7f010001
13 | int attr ptrHeaderSubTextColor 0x7f010003
14 | int attr ptrHeaderTextAppearance 0x7f01000a
15 | int attr ptrHeaderTextColor 0x7f010002
16 | int attr ptrListViewExtrasEnabled 0x7f01000e
17 | int attr ptrMode 0x7f010004
18 | int attr ptrOverScroll 0x7f010009
19 | int attr ptrRefreshableViewBackground 0x7f010000
20 | int attr ptrRotateDrawableWhilePulling 0x7f01000f
21 | int attr ptrScrollingWhileRefreshingEnabled 0x7f01000d
22 | int attr ptrShowIndicator 0x7f010005
23 | int attr ptrSubHeaderTextAppearance 0x7f01000b
24 | int dimen header_footer_bottom_padding 0x7f050005
25 | int dimen header_footer_left_right_padding 0x7f050003
26 | int dimen header_footer_top_padding 0x7f050004
27 | int dimen indicator_corner_radius 0x7f050001
28 | int dimen indicator_internal_padding 0x7f050002
29 | int dimen indicator_right_padding 0x7f050000
30 | int drawable default_ptr_flip 0x7f020000
31 | int drawable default_ptr_rotate 0x7f020001
32 | int drawable image_loading 0x7f020002
33 | int drawable indicator_arrow 0x7f020003
34 | int drawable indicator_bg_bottom 0x7f020004
35 | int drawable indicator_bg_top 0x7f020005
36 | int drawable loading1 0x7f020006
37 | int drawable loading2 0x7f020007
38 | int id both 0x7f060003
39 | int id disabled 0x7f060004
40 | int id fl_inner 0x7f06000c
41 | int id flip 0x7f06000a
42 | int id gridview 0x7f060000
43 | int id manualOnly 0x7f060005
44 | int id pullDownFromTop 0x7f060006
45 | int id pullFromEnd 0x7f060007
46 | int id pullFromStart 0x7f060008
47 | int id pullUpFromBottom 0x7f060009
48 | int id pull_to_refresh_image 0x7f06000d
49 | int id pull_to_refresh_progress 0x7f06000e
50 | int id pull_to_refresh_sub_text 0x7f060010
51 | int id pull_to_refresh_text 0x7f06000f
52 | int id rotate 0x7f06000b
53 | int id scrollview 0x7f060002
54 | int id webview 0x7f060001
55 | int layout pull_to_refresh_header_horizontal 0x7f030000
56 | int layout pull_to_refresh_header_vertical 0x7f030001
57 | int string pull_to_refresh_from_bottom_pull_label 0x7f070003
58 | int string pull_to_refresh_from_bottom_refreshing_label 0x7f070005
59 | int string pull_to_refresh_from_bottom_release_label 0x7f070004
60 | int string pull_to_refresh_pull_label 0x7f070000
61 | int string pull_to_refresh_refreshing_label 0x7f070002
62 | int string pull_to_refresh_release_label 0x7f070001
63 | int[] styleable PullToRefresh { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012 }
64 | int styleable PullToRefresh_ptrAdapterViewBackground 16
65 | int styleable PullToRefresh_ptrAnimationStyle 12
66 | int styleable PullToRefresh_ptrDrawable 6
67 | int styleable PullToRefresh_ptrDrawableBottom 18
68 | int styleable PullToRefresh_ptrDrawableEnd 8
69 | int styleable PullToRefresh_ptrDrawableStart 7
70 | int styleable PullToRefresh_ptrDrawableTop 17
71 | int styleable PullToRefresh_ptrHeaderBackground 1
72 | int styleable PullToRefresh_ptrHeaderSubTextColor 3
73 | int styleable PullToRefresh_ptrHeaderTextAppearance 10
74 | int styleable PullToRefresh_ptrHeaderTextColor 2
75 | int styleable PullToRefresh_ptrListViewExtrasEnabled 14
76 | int styleable PullToRefresh_ptrMode 4
77 | int styleable PullToRefresh_ptrOverScroll 9
78 | int styleable PullToRefresh_ptrRefreshableViewBackground 0
79 | int styleable PullToRefresh_ptrRotateDrawableWhilePulling 15
80 | int styleable PullToRefresh_ptrScrollingWhileRefreshingEnabled 13
81 | int styleable PullToRefresh_ptrShowIndicator 5
82 | int styleable PullToRefresh_ptrSubHeaderTextAppearance 11
83 |
--------------------------------------------------------------------------------
/.svn/pristine/eb/eb8ff9bcdd6ef6532f759cdde88c01312aa6e199.svn-base:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.util.AttributeSet;
23 | import android.view.View;
24 | import android.widget.HorizontalScrollView;
25 |
26 | public class PullToRefreshHorizontalScrollView extends PullToRefreshBase {
27 |
28 | public PullToRefreshHorizontalScrollView(Context context) {
29 | super(context);
30 | }
31 |
32 | public PullToRefreshHorizontalScrollView(Context context, AttributeSet attrs) {
33 | super(context, attrs);
34 | }
35 |
36 | public PullToRefreshHorizontalScrollView(Context context, Mode mode) {
37 | super(context, mode);
38 | }
39 |
40 | public PullToRefreshHorizontalScrollView(Context context, Mode mode, AnimationStyle style) {
41 | super(context, mode, style);
42 | }
43 |
44 | @Override
45 | public final Orientation getPullToRefreshScrollDirection() {
46 | return Orientation.HORIZONTAL;
47 | }
48 |
49 | @Override
50 | protected HorizontalScrollView createRefreshableView(Context context, AttributeSet attrs) {
51 | HorizontalScrollView scrollView;
52 |
53 | if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
54 | scrollView = new InternalHorizontalScrollViewSDK9(context, attrs);
55 | } else {
56 | scrollView = new HorizontalScrollView(context, attrs);
57 | }
58 |
59 | scrollView.setId(R.id.scrollview);
60 | return scrollView;
61 | }
62 |
63 | @Override
64 | protected boolean isReadyForPullStart() {
65 | return mRefreshableView.getScrollX() == 0;
66 | }
67 |
68 | @Override
69 | protected boolean isReadyForPullEnd() {
70 | View scrollViewChild = mRefreshableView.getChildAt(0);
71 | if (null != scrollViewChild) {
72 | return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
73 | }
74 | return false;
75 | }
76 |
77 | @TargetApi(9)
78 | final class InternalHorizontalScrollViewSDK9 extends HorizontalScrollView {
79 |
80 | public InternalHorizontalScrollViewSDK9(Context context, AttributeSet attrs) {
81 | super(context, attrs);
82 | }
83 |
84 | @Override
85 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX,
86 | int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
87 |
88 | final boolean returnValue = super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX,
89 | scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent);
90 |
91 | // Does all of the hard work...
92 | OverscrollHelper.overScrollBy(PullToRefreshHorizontalScrollView.this, deltaX, scrollX, deltaY, scrollY,
93 | getScrollRange(), isTouchEvent);
94 |
95 | return returnValue;
96 | }
97 |
98 | /**
99 | * Taken from the AOSP ScrollView source
100 | */
101 | private int getScrollRange() {
102 | int scrollRange = 0;
103 | if (getChildCount() > 0) {
104 | View child = getChildAt(0);
105 | scrollRange = Math.max(0, child.getWidth() - (getWidth() - getPaddingLeft() - getPaddingRight()));
106 | }
107 | return scrollRange;
108 | }
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/.svn/pristine/ec/ec9abc7aa56dc58e9dbd8de0dce094bd0dc5c185.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | com.github.chrisbanes.pulltorefresh
6 | library
7 | apklib
8 | Android-PullToRefresh Library
9 |
10 |
11 | com.github.chrisbanes.pulltorefresh
12 | parent
13 | 2.1.2-SNAPSHOT
14 |
15 |
16 |
17 |
18 | com.google.android
19 | android
20 |
21 |
22 |
23 |
24 |
25 | com.jayway.maven.plugins.android.generation2
26 | android-maven-plugin
27 |
28 |
29 | org.apache.maven.plugins
30 | maven-eclipse-plugin
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/.svn/pristine/f1/f1a36bbac81b90b04333bbafa27b6f84b3a3946c.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 | PullToRefreshLibrary
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/.svn/pristine/f7/f70e25fa50d627eeb926c2e7d4dc6eb511ba4f85.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
17 |
18 |
--------------------------------------------------------------------------------
/.svn/pristine/fa/fac2d7e3d1d91262016b2a80483dc42e37ee5c65.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/pristine/fa/fac2d7e3d1d91262016b2a80483dc42e37ee5c65.svn-base
--------------------------------------------------------------------------------
/.svn/pristine/fc/fc1d48d3e807bbf8a2fc2412fa16e6a05ac16b59.svn-base:
--------------------------------------------------------------------------------
1 | package com.handmark.pulltorefresh.library.internal;
2 |
3 | import android.util.Log;
4 |
5 | public class Utils {
6 |
7 | static final String LOG_TAG = "PullToRefresh";
8 |
9 | public static void warnDeprecation(String depreacted, String replacement) {
10 | Log.w(LOG_TAG, "You're using the deprecated " + depreacted + " attr, please switch over to " + replacement);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/.svn/pristine/fe/fe30e92fbf1c987979f89acd1ca702cd6ddaaa5a.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
10 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/.svn/tmp/project.properties.tmp:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-17
12 | android.library=true
13 | android.library.reference.1=../AndroidStaggeredView-Lib
14 |
--------------------------------------------------------------------------------
/.svn/tmp/svn.tmp:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-17
12 | android.library=true
13 |
--------------------------------------------------------------------------------
/.svn/wc.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/.svn/wc.db
--------------------------------------------------------------------------------
/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PullToRefreshLibrary
2 | 支持瀑布流的下拉刷新和滑到底部加载更多
3 | =
4 | 实现原理:基于com.handmark.pulltorefresh和com.etsy.android.grid.StaggeredGridView
5 |
6 | 功能:下拉刷新;上拉加载更多(或滑动到底部自动加载,可自行选择调用)。
7 |
8 | #使用须知
9 | 1. 默认方式是上拉加载更多
10 | 2. 滑动到底部自动加载只需简单的两步:
11 |
12 | 设置滑动监听
13 |
14 | mPullToRefreshStaggeredGridView = (PullToRefreshStaggeredGridView) findViewById(R.id.sgv);
15 | mPullToRefreshStaggeredGridView.setOnRefreshListener(this);
16 | mPullToRefreshStaggeredGridView.setMode(Mode.BOTH);
17 | mPullToRefreshStaggeredGridView.setOnScrollListener(this);(this 是activity 或 fragment)
18 |
19 | 重写onScroll方法
20 |
21 | @Override
22 |
23 | public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount)
24 | {
25 | boolean lastItemVisible = (totalItemCount > 0) &&
26 | (firstVisibleItem + visibleItemCount >= totalItemCount - 1);
27 | if (lastItemVisible) {
28 | mPullToRefreshStaggeredGridView.setPullUpToRefreshing(mPullToRefreshStaggeredGridView);
29 | }
30 | }
31 |
32 | 下拉刷新效果:
33 |
34 | 
35 |
36 | 滑到底部自动加载效果:
37 |
38 | 
39 |
--------------------------------------------------------------------------------
/bin/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/bin/R.txt:
--------------------------------------------------------------------------------
1 | int anim slide_in_from_bottom 0x7f040000
2 | int anim slide_in_from_top 0x7f040001
3 | int anim slide_out_to_bottom 0x7f040002
4 | int anim slide_out_to_top 0x7f040003
5 | int attr column_count 0x7f010000
6 | int attr column_count_landscape 0x7f010002
7 | int attr column_count_portrait 0x7f010001
8 | int attr grid_paddingBottom 0x7f010007
9 | int attr grid_paddingLeft 0x7f010004
10 | int attr grid_paddingRight 0x7f010005
11 | int attr grid_paddingTop 0x7f010006
12 | int attr item_margin 0x7f010003
13 | int attr ptrAdapterViewBackground 0x7f010018
14 | int attr ptrAnimationStyle 0x7f010014
15 | int attr ptrDrawable 0x7f01000e
16 | int attr ptrDrawableBottom 0x7f01001a
17 | int attr ptrDrawableEnd 0x7f010010
18 | int attr ptrDrawableStart 0x7f01000f
19 | int attr ptrDrawableTop 0x7f010019
20 | int attr ptrHeaderBackground 0x7f010009
21 | int attr ptrHeaderSubTextColor 0x7f01000b
22 | int attr ptrHeaderTextAppearance 0x7f010012
23 | int attr ptrHeaderTextColor 0x7f01000a
24 | int attr ptrListViewExtrasEnabled 0x7f010016
25 | int attr ptrMode 0x7f01000c
26 | int attr ptrOverScroll 0x7f010011
27 | int attr ptrRefreshableViewBackground 0x7f010008
28 | int attr ptrRotateDrawableWhilePulling 0x7f010017
29 | int attr ptrScrollingWhileRefreshingEnabled 0x7f010015
30 | int attr ptrShowIndicator 0x7f01000d
31 | int attr ptrSubHeaderTextAppearance 0x7f010013
32 | int dimen header_footer_bottom_padding 0x7f050005
33 | int dimen header_footer_left_right_padding 0x7f050003
34 | int dimen header_footer_top_padding 0x7f050004
35 | int dimen indicator_corner_radius 0x7f050001
36 | int dimen indicator_internal_padding 0x7f050002
37 | int dimen indicator_right_padding 0x7f050000
38 | int drawable default_ptr_flip 0x7f020000
39 | int drawable default_ptr_rotate 0x7f020001
40 | int drawable image_loading 0x7f020002
41 | int drawable indicator_arrow 0x7f020003
42 | int drawable indicator_bg_bottom 0x7f020004
43 | int drawable indicator_bg_top 0x7f020005
44 | int drawable loading1 0x7f020006
45 | int drawable loading2 0x7f020007
46 | int id both 0x7f060004
47 | int id disabled 0x7f060005
48 | int id fl_inner 0x7f06000d
49 | int id flip 0x7f06000b
50 | int id gridview 0x7f060000
51 | int id manualOnly 0x7f060006
52 | int id pullDownFromTop 0x7f060007
53 | int id pullFromEnd 0x7f060008
54 | int id pullFromStart 0x7f060009
55 | int id pullUpFromBottom 0x7f06000a
56 | int id pull_to_refresh_image 0x7f06000e
57 | int id pull_to_refresh_progress 0x7f06000f
58 | int id pull_to_refresh_sub_text 0x7f060011
59 | int id pull_to_refresh_text 0x7f060010
60 | int id rotate 0x7f06000c
61 | int id scrollview 0x7f060002
62 | int id staggeredGridView 0x7f060003
63 | int id webview 0x7f060001
64 | int layout pull_to_refresh_header_horizontal 0x7f030000
65 | int layout pull_to_refresh_header_vertical 0x7f030001
66 | int string pull_to_refresh_from_bottom_pull_label 0x7f070003
67 | int string pull_to_refresh_from_bottom_refreshing_label 0x7f070005
68 | int string pull_to_refresh_from_bottom_release_label 0x7f070004
69 | int string pull_to_refresh_pull_label 0x7f070000
70 | int string pull_to_refresh_refreshing_label 0x7f070002
71 | int string pull_to_refresh_release_label 0x7f070001
72 | int[] styleable PullToRefresh { 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012, 0x7f010013, 0x7f010014, 0x7f010015, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001a }
73 | int styleable PullToRefresh_ptrAdapterViewBackground 16
74 | int styleable PullToRefresh_ptrAnimationStyle 12
75 | int styleable PullToRefresh_ptrDrawable 6
76 | int styleable PullToRefresh_ptrDrawableBottom 18
77 | int styleable PullToRefresh_ptrDrawableEnd 8
78 | int styleable PullToRefresh_ptrDrawableStart 7
79 | int styleable PullToRefresh_ptrDrawableTop 17
80 | int styleable PullToRefresh_ptrHeaderBackground 1
81 | int styleable PullToRefresh_ptrHeaderSubTextColor 3
82 | int styleable PullToRefresh_ptrHeaderTextAppearance 10
83 | int styleable PullToRefresh_ptrHeaderTextColor 2
84 | int styleable PullToRefresh_ptrListViewExtrasEnabled 14
85 | int styleable PullToRefresh_ptrMode 4
86 | int styleable PullToRefresh_ptrOverScroll 9
87 | int styleable PullToRefresh_ptrRefreshableViewBackground 0
88 | int styleable PullToRefresh_ptrRotateDrawableWhilePulling 15
89 | int styleable PullToRefresh_ptrScrollingWhileRefreshingEnabled 13
90 | int styleable PullToRefresh_ptrShowIndicator 5
91 | int styleable PullToRefresh_ptrSubHeaderTextAppearance 11
92 | int[] styleable StaggeredGridView { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007 }
93 | int styleable StaggeredGridView_column_count 0
94 | int styleable StaggeredGridView_column_count_landscape 2
95 | int styleable StaggeredGridView_column_count_portrait 1
96 | int styleable StaggeredGridView_grid_paddingBottom 7
97 | int styleable StaggeredGridView_grid_paddingLeft 4
98 | int styleable StaggeredGridView_grid_paddingRight 5
99 | int styleable StaggeredGridView_grid_paddingTop 6
100 | int styleable StaggeredGridView_item_margin 3
101 |
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ClassLoaderSavedState$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ClassLoaderSavedState$1.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ClassLoaderSavedState$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ClassLoaderSavedState$2.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ClassLoaderSavedState.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ClassLoaderSavedState.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView$AdapterDataSetObserver.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView$AdapterDataSetObserver.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView$FixedViewInfo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView$FixedViewInfo.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView$FlingRunnable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView$FlingRunnable.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView$LayoutParams.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView$LayoutParams.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView$ListSavedState$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView$ListSavedState$1.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView$ListSavedState.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView$ListSavedState.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView$PerformClick.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView$PerformClick.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView$RecycleBin.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView$RecycleBin.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView$WindowRunnnable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView$WindowRunnnable.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/ExtendableListView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/ExtendableListView.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/HeaderViewListAdapter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/HeaderViewListAdapter.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/StaggeredGridView$GridItemRecord$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/StaggeredGridView$GridItemRecord$1.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/StaggeredGridView$GridItemRecord.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/StaggeredGridView$GridItemRecord.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/StaggeredGridView$GridLayoutParams.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/StaggeredGridView$GridLayoutParams.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/StaggeredGridView$GridListSavedState$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/StaggeredGridView$GridListSavedState$1.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/StaggeredGridView$GridListSavedState.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/StaggeredGridView$GridListSavedState.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/StaggeredGridView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/StaggeredGridView.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/util/DynamicHeightImageView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/util/DynamicHeightImageView.class
--------------------------------------------------------------------------------
/bin/classes/com/etsy/android/grid/util/DynamicHeightTextView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/etsy/android/grid/util/DynamicHeightTextView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/BuildConfig.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/BuildConfig.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/ILoadingLayout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/ILoadingLayout.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/IPullToRefresh.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/IPullToRefresh.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/LoadingLayoutProxy.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/LoadingLayoutProxy.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/OverscrollHelper.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/OverscrollHelper.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$1.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$2.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$3.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$AnimationStyle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$AnimationStyle.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$Mode.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$Mode.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnLastItemVisibleListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnLastItemVisibleListener.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnPullEventListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnPullEventListener.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnRefreshListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnRefreshListener.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnRefreshListener2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnRefreshListener2.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnSmoothScrollFinishedListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$OnSmoothScrollFinishedListener.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$Orientation.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$Orientation.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$SmoothScrollRunnable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$SmoothScrollRunnable.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$State.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase$State.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshBase.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView$InternalExpandableListView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView$InternalExpandableListView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView$InternalExpandableListViewSDK9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView$InternalExpandableListViewSDK9.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshGridView$InternalGridView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshGridView$InternalGridView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshGridView$InternalGridViewSDK9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshGridView$InternalGridViewSDK9.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshGridView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshGridView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshHorizontalScrollView$InternalHorizontalScrollViewSDK9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshHorizontalScrollView$InternalHorizontalScrollViewSDK9.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshHorizontalScrollView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshHorizontalScrollView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshListView$InternalListView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshListView$InternalListView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshListView$InternalListViewSDK9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshListView$InternalListViewSDK9.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshListView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshListView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshScrollView$InternalScrollViewSDK9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshScrollView$InternalScrollViewSDK9.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshScrollView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshScrollView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshStaggeredGridView$InternalStaggeredGridViewSDK9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshStaggeredGridView$InternalStaggeredGridViewSDK9.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshStaggeredGridView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshStaggeredGridView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshWebView$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshWebView$1.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshWebView$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshWebView$2.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshWebView$InternalWebViewSDK9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshWebView$InternalWebViewSDK9.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshWebView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/PullToRefreshWebView.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/R$anim.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/R$anim.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/R$attr.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/R$attr.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/R$dimen.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/R$dimen.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/R$drawable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/R$drawable.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/R$id.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/R$id.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/R$layout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/R$layout.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/R$string.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/R$string.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/R$styleable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/R$styleable.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/R.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/R.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/extras/PullToRefreshWebView2$JsValueCallback.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/extras/PullToRefreshWebView2$JsValueCallback.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/extras/PullToRefreshWebView2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/extras/PullToRefreshWebView2.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/extras/SoundPullEventListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/extras/SoundPullEventListener.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/internal/EmptyViewMethodAccessor.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/internal/EmptyViewMethodAccessor.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/internal/FlipLoadingLayout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/internal/FlipLoadingLayout.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/internal/IndicatorLayout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/internal/IndicatorLayout.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/internal/LoadingLayout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/internal/LoadingLayout.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/internal/RotateLoadingLayout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/internal/RotateLoadingLayout.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/internal/Utils.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/internal/Utils.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/internal/ViewCompat$SDK11.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/internal/ViewCompat$SDK11.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/internal/ViewCompat$SDK16.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/internal/ViewCompat$SDK16.class
--------------------------------------------------------------------------------
/bin/classes/com/handmark/pulltorefresh/library/internal/ViewCompat.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/classes/com/handmark/pulltorefresh/library/internal/ViewCompat.class
--------------------------------------------------------------------------------
/bin/jarlist.cache:
--------------------------------------------------------------------------------
1 | # cache for current jar dependency. DO NOT EDIT.
2 | # format is
3 | # Encoding is UTF-8
4 |
--------------------------------------------------------------------------------
/bin/pulltorefreshlibrary.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/pulltorefreshlibrary.jar
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-hdpi/default_ptr_flip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-hdpi/default_ptr_flip.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-hdpi/default_ptr_rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-hdpi/default_ptr_rotate.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-hdpi/indicator_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-hdpi/indicator_arrow.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-hdpi/loading1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-hdpi/loading1.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-hdpi/loading2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-hdpi/loading2.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-mdpi/default_ptr_flip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-mdpi/default_ptr_flip.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-mdpi/default_ptr_rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-mdpi/default_ptr_rotate.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-mdpi/indicator_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-mdpi/indicator_arrow.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-xhdpi/default_ptr_flip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-xhdpi/default_ptr_flip.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-xhdpi/default_ptr_rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-xhdpi/default_ptr_rotate.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-xhdpi/indicator_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-xhdpi/indicator_arrow.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-xhdpi/loading1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-xhdpi/loading1.png
--------------------------------------------------------------------------------
/bin/res/crunch/drawable-xhdpi/loading2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/bin/res/crunch/drawable-xhdpi/loading2.png
--------------------------------------------------------------------------------
/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
49 |
50 |
51 |
52 |
56 |
57 |
69 |
70 |
71 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/gen/com/handmark/pulltorefresh/library/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /** Automatically generated file. DO NOT MODIFY */
2 | package com.handmark.pulltorefresh.library;
3 |
4 | public final class BuildConfig {
5 | public final static boolean DEBUG = true;
6 | }
--------------------------------------------------------------------------------
/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 |
7 | # location of the SDK. This is only used by Ant
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=/Users/harry/develop/adt-bundle-mac-x86_64-20131030/sdk
11 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | com.github.chrisbanes.pulltorefresh
6 | library
7 | apklib
8 | Android-PullToRefresh Library
9 |
10 |
11 | com.github.chrisbanes.pulltorefresh
12 | parent
13 | 2.1.2-SNAPSHOT
14 |
15 |
16 |
17 |
18 | com.google.android
19 | android
20 |
21 |
22 |
23 |
24 |
25 | com.jayway.maven.plugins.android.generation2
26 | android-maven-plugin
27 |
28 |
29 | org.apache.maven.plugins
30 | maven-eclipse-plugin
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-17
12 | android.library=true
13 |
--------------------------------------------------------------------------------
/res/anim/slide_in_from_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
--------------------------------------------------------------------------------
/res/anim/slide_in_from_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
--------------------------------------------------------------------------------
/res/anim/slide_out_to_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
--------------------------------------------------------------------------------
/res/anim/slide_out_to_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
--------------------------------------------------------------------------------
/res/drawable-hdpi/default_ptr_flip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-hdpi/default_ptr_flip.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/default_ptr_rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-hdpi/default_ptr_rotate.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/indicator_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-hdpi/indicator_arrow.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/loading1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-hdpi/loading1.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/loading2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-hdpi/loading2.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/default_ptr_flip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-mdpi/default_ptr_flip.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/default_ptr_rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-mdpi/default_ptr_rotate.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/indicator_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-mdpi/indicator_arrow.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/default_ptr_flip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-xhdpi/default_ptr_flip.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/default_ptr_rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-xhdpi/default_ptr_rotate.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/indicator_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-xhdpi/indicator_arrow.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/loading1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-xhdpi/loading1.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/loading2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harichen/PullToRefreshLibrary/ef5d82812ddface18cd46753e55f2e119bb4063b/res/drawable-xhdpi/loading2.png
--------------------------------------------------------------------------------
/res/drawable/image_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
10 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/res/drawable/indicator_bg_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
17 |
18 |
--------------------------------------------------------------------------------
/res/drawable/indicator_bg_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
17 |
18 |
--------------------------------------------------------------------------------
/res/layout/pull_to_refresh_header_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
18 |
19 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/res/layout/pull_to_refresh_header_vertical.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
17 |
18 |
23 |
24 |
32 |
33 |
34 |
40 |
41 |
48 |
49 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
77 |
78 |
79 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 10dp
5 | 12dp
6 | 4dp
7 | 24dp
8 | 8dp
9 | 0dp
10 |
11 |
--------------------------------------------------------------------------------
/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/res/values/pull_refresh_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 下拉刷新…
5 | 松开刷新…
6 | 努力加载中…
7 |
8 |
9 | 上拉加载更多
10 | 松开加载…
11 | 努力加载中…
12 |
13 |
--------------------------------------------------------------------------------
/src/com/etsy/android/grid/ClassLoaderSavedState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Etsy
3 | * Copyright (C) 2006 The Android Open Source Project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.etsy.android.grid;
19 |
20 | import android.os.Parcel;
21 | import android.os.Parcelable;
22 |
23 |
24 | /**
25 | * A {@link android.os.Parcelable} implementation that should be used by inheritance
26 | * hierarchies to ensure the state of all classes along the chain is saved.
27 | */
28 | public abstract class ClassLoaderSavedState implements Parcelable {
29 | public static final ClassLoaderSavedState EMPTY_STATE = new ClassLoaderSavedState() {};
30 |
31 | private Parcelable mSuperState = EMPTY_STATE;
32 | private ClassLoader mClassLoader;
33 |
34 | /**
35 | * Constructor used to make the EMPTY_STATE singleton
36 | */
37 | private ClassLoaderSavedState() {
38 | mSuperState = null;
39 | mClassLoader = null;
40 | }
41 |
42 | /**
43 | * Constructor called by derived classes when creating their ListSavedState objects
44 | *
45 | * @param superState The state of the superclass of this view
46 | */
47 | protected ClassLoaderSavedState(Parcelable superState, ClassLoader classLoader) {
48 | mClassLoader = classLoader;
49 | if (superState == null) {
50 | throw new IllegalArgumentException("superState must not be null");
51 | }
52 | else {
53 | mSuperState = superState != EMPTY_STATE ? superState : null;
54 | }
55 | }
56 |
57 | /**
58 | * Constructor used when reading from a parcel. Reads the state of the superclass.
59 | *
60 | * @param source
61 | */
62 | protected ClassLoaderSavedState(Parcel source) {
63 | // ETSY : we're using the passed super class loader unlike AbsSavedState
64 | Parcelable superState = source.readParcelable(mClassLoader);
65 | mSuperState = superState != null ? superState : EMPTY_STATE;
66 | }
67 |
68 | final public Parcelable getSuperState() {
69 | return mSuperState;
70 | }
71 |
72 | public int describeContents() {
73 | return 0;
74 | }
75 |
76 | public void writeToParcel(Parcel dest, int flags) {
77 | dest.writeParcelable(mSuperState, flags);
78 | }
79 |
80 | public static final Parcelable.Creator CREATOR
81 | = new Parcelable.Creator() {
82 |
83 | public ClassLoaderSavedState createFromParcel(Parcel in) {
84 | Parcelable superState = in.readParcelable(null);
85 | if (superState != null) {
86 | throw new IllegalStateException("superState must be null");
87 | }
88 | return EMPTY_STATE;
89 | }
90 |
91 | public ClassLoaderSavedState[] newArray(int size) {
92 | return new ClassLoaderSavedState[size];
93 | }
94 | };
95 | }
96 |
--------------------------------------------------------------------------------
/src/com/etsy/android/grid/util/DynamicHeightImageView.java:
--------------------------------------------------------------------------------
1 | package com.etsy.android.grid.util;
2 |
3 | import android.annotation.TargetApi;
4 | import android.content.Context;
5 | import android.graphics.Canvas;
6 | import android.graphics.Path;
7 | import android.graphics.RectF;
8 | import android.os.Build;
9 | import android.util.AttributeSet;
10 | import android.view.View;
11 | import android.widget.ImageView;
12 |
13 | /**
14 | * An {@link android.widget.ImageView} layout that maintains a consistent width to height aspect ratio.
15 | */
16 | public class DynamicHeightImageView extends ImageView {
17 |
18 | private double mHeightRatio;
19 | public static float radius = 2.0f;
20 |
21 | Path clipPath = new Path();
22 | RectF rect = new RectF(0, 0, this.getWidth(), this.getHeight());
23 |
24 | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
25 | public DynamicHeightImageView(Context context, AttributeSet attrs) {
26 | super(context, attrs);
27 | if (Build.VERSION.SDK_INT < 18) {
28 | this.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
29 | }
30 | }
31 |
32 | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
33 | public DynamicHeightImageView(Context context) {
34 | super(context);
35 | if (Build.VERSION.SDK_INT < 18) {
36 | this.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
37 | }
38 | }
39 |
40 | public void setHeightRatio(double ratio) {
41 | if (ratio != mHeightRatio) {
42 | mHeightRatio = ratio;
43 | requestLayout();
44 | }
45 | }
46 |
47 | public double getHeightRatio() {
48 | return mHeightRatio;
49 | }
50 |
51 | @Override
52 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
53 | if (mHeightRatio > 0.0) {
54 | // set the image views size
55 | int width = MeasureSpec.getSize(widthMeasureSpec);
56 | int height = (int) (width * mHeightRatio);
57 | setMeasuredDimension(width, height);
58 | }
59 | else {
60 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
61 | }
62 | }
63 |
64 | @Override
65 | protected void onDraw(Canvas canvas) {
66 | rect.left = 0;
67 | rect.top = 0;
68 | rect.right = this.getWidth();
69 | rect.bottom = this.getHeight();
70 | clipPath.addRoundRect(rect, radius, radius, Path.Direction.CW);
71 | canvas.clipPath(clipPath);
72 | super.onDraw(canvas);
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/com/etsy/android/grid/util/DynamicHeightTextView.java:
--------------------------------------------------------------------------------
1 | package com.etsy.android.grid.util;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.TextView;
6 |
7 | /**
8 | *
9 | * A {@link android.widget.TextView} that maintains a consistent width to height aspect ratio.
10 | * In the real world this would likely extend ImageView.
11 | */
12 | public class DynamicHeightTextView extends TextView {
13 |
14 | private double mHeightRatio;
15 |
16 | public DynamicHeightTextView(Context context, AttributeSet attrs) {
17 | super(context, attrs);
18 | }
19 |
20 | public DynamicHeightTextView(Context context) {
21 | super(context);
22 | }
23 |
24 | public void setHeightRatio(double ratio) {
25 | if (ratio != mHeightRatio) {
26 | mHeightRatio = ratio;
27 | requestLayout();
28 | }
29 | }
30 |
31 | public double getHeightRatio() {
32 | return mHeightRatio;
33 | }
34 |
35 | @Override
36 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
37 | if (mHeightRatio > 0.0) {
38 | // set the image views size
39 | int width = MeasureSpec.getSize(widthMeasureSpec);
40 | int height = (int) (width * mHeightRatio);
41 | setMeasuredDimension(width, height);
42 | }
43 | else {
44 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/ILoadingLayout.java:
--------------------------------------------------------------------------------
1 | package com.handmark.pulltorefresh.library;
2 |
3 | import android.graphics.Typeface;
4 | import android.graphics.drawable.Drawable;
5 |
6 | public interface ILoadingLayout {
7 |
8 | /**
9 | * Set the Last Updated Text. This displayed under the main label when
10 | * Pulling
11 | *
12 | * @param label - Label to set
13 | */
14 | public void setLastUpdatedLabel(CharSequence label);
15 |
16 | /**
17 | * Set the drawable used in the loading layout. This is the same as calling
18 | * setLoadingDrawable(drawable, Mode.BOTH)
19 | *
20 | * @param drawable - Drawable to display
21 | */
22 | public void setLoadingDrawable(Drawable drawable);
23 |
24 | /**
25 | * Set Text to show when the Widget is being Pulled
26 | * setPullLabel(releaseLabel, Mode.BOTH)
27 | *
28 | * @param pullLabel - CharSequence to display
29 | */
30 | public void setPullLabel(CharSequence pullLabel);
31 |
32 | /**
33 | * Set Text to show when the Widget is refreshing
34 | * setRefreshingLabel(releaseLabel, Mode.BOTH)
35 | *
36 | * @param refreshingLabel - CharSequence to display
37 | */
38 | public void setRefreshingLabel(CharSequence refreshingLabel);
39 |
40 | /**
41 | * Set Text to show when the Widget is being pulled, and will refresh when
42 | * released. This is the same as calling
43 | * setReleaseLabel(releaseLabel, Mode.BOTH)
44 | *
45 | * @param releaseLabel - CharSequence to display
46 | */
47 | public void setReleaseLabel(CharSequence releaseLabel);
48 |
49 | /**
50 | * Set's the Sets the typeface and style in which the text should be
51 | * displayed. Please see
52 | * {@link android.widget.TextView#setTypeface(Typeface)
53 | * TextView#setTypeface(Typeface)}.
54 | */
55 | public void setTextTypeface(Typeface tf);
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/LoadingLayoutProxy.java:
--------------------------------------------------------------------------------
1 | package com.handmark.pulltorefresh.library;
2 |
3 | import java.util.HashSet;
4 |
5 | import android.graphics.Typeface;
6 | import android.graphics.drawable.Drawable;
7 |
8 | import com.handmark.pulltorefresh.library.internal.LoadingLayout;
9 |
10 | public class LoadingLayoutProxy implements ILoadingLayout {
11 |
12 | private final HashSet mLoadingLayouts;
13 |
14 | LoadingLayoutProxy() {
15 | mLoadingLayouts = new HashSet();
16 | }
17 |
18 | /**
19 | * This allows you to add extra LoadingLayout instances to this proxy. This
20 | * is only necessary if you keep your own instances, and want to have them
21 | * included in any
22 | * {@link PullToRefreshBase#createLoadingLayoutProxy(boolean, boolean)
23 | * createLoadingLayoutProxy(...)} calls.
24 | *
25 | * @param layout - LoadingLayout to have included.
26 | */
27 | public void addLayout(LoadingLayout layout) {
28 | if (null != layout) {
29 | mLoadingLayouts.add(layout);
30 | }
31 | }
32 |
33 | @Override
34 | public void setLastUpdatedLabel(CharSequence label) {
35 | for (LoadingLayout layout : mLoadingLayouts) {
36 | layout.setLastUpdatedLabel(label);
37 | }
38 | }
39 |
40 | @Override
41 | public void setLoadingDrawable(Drawable drawable) {
42 | for (LoadingLayout layout : mLoadingLayouts) {
43 | layout.setLoadingDrawable(drawable);
44 | }
45 | }
46 |
47 | @Override
48 | public void setRefreshingLabel(CharSequence refreshingLabel) {
49 | for (LoadingLayout layout : mLoadingLayouts) {
50 | layout.setRefreshingLabel(refreshingLabel);
51 | }
52 | }
53 |
54 | @Override
55 | public void setPullLabel(CharSequence label) {
56 | for (LoadingLayout layout : mLoadingLayouts) {
57 | layout.setPullLabel(label);
58 | }
59 | }
60 |
61 | @Override
62 | public void setReleaseLabel(CharSequence label) {
63 | for (LoadingLayout layout : mLoadingLayouts) {
64 | layout.setReleaseLabel(label);
65 | }
66 | }
67 |
68 | public void setTextTypeface(Typeface tf) {
69 | for (LoadingLayout layout : mLoadingLayouts) {
70 | layout.setTextTypeface(tf);
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.util.AttributeSet;
23 | import android.view.View;
24 | import android.widget.ExpandableListView;
25 |
26 | import com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor;
27 |
28 | public class PullToRefreshExpandableListView extends PullToRefreshAdapterViewBase {
29 |
30 | public PullToRefreshExpandableListView(Context context) {
31 | super(context);
32 | }
33 |
34 | public PullToRefreshExpandableListView(Context context, AttributeSet attrs) {
35 | super(context, attrs);
36 | }
37 |
38 | public PullToRefreshExpandableListView(Context context, Mode mode) {
39 | super(context, mode);
40 | }
41 |
42 | public PullToRefreshExpandableListView(Context context, Mode mode, AnimationStyle style) {
43 | super(context, mode, style);
44 | }
45 |
46 | @Override
47 | public final Orientation getPullToRefreshScrollDirection() {
48 | return Orientation.VERTICAL;
49 | }
50 |
51 | @Override
52 | protected ExpandableListView createRefreshableView(Context context, AttributeSet attrs) {
53 | final ExpandableListView lv;
54 | if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
55 | lv = new InternalExpandableListViewSDK9(context, attrs);
56 | } else {
57 | lv = new InternalExpandableListView(context, attrs);
58 | }
59 |
60 | // Set it to this so it can be used in ListActivity/ListFragment
61 | lv.setId(android.R.id.list);
62 | return lv;
63 | }
64 |
65 | class InternalExpandableListView extends ExpandableListView implements EmptyViewMethodAccessor {
66 |
67 | public InternalExpandableListView(Context context, AttributeSet attrs) {
68 | super(context, attrs);
69 | }
70 |
71 | @Override
72 | public void setEmptyView(View emptyView) {
73 | PullToRefreshExpandableListView.this.setEmptyView(emptyView);
74 | }
75 |
76 | @Override
77 | public void setEmptyViewInternal(View emptyView) {
78 | super.setEmptyView(emptyView);
79 | }
80 | }
81 |
82 | @TargetApi(9)
83 | final class InternalExpandableListViewSDK9 extends InternalExpandableListView {
84 |
85 | public InternalExpandableListViewSDK9(Context context, AttributeSet attrs) {
86 | super(context, attrs);
87 | }
88 |
89 | @Override
90 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX,
91 | int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
92 |
93 | final boolean returnValue = super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX,
94 | scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent);
95 |
96 | // Does all of the hard work...
97 | OverscrollHelper.overScrollBy(PullToRefreshExpandableListView.this, deltaX, scrollX, deltaY, scrollY,
98 | isTouchEvent);
99 |
100 | return returnValue;
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/PullToRefreshGridView.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.util.AttributeSet;
23 | import android.view.View;
24 | import android.widget.GridView;
25 |
26 | import com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor;
27 |
28 | public class PullToRefreshGridView extends PullToRefreshAdapterViewBase {
29 |
30 | public PullToRefreshGridView(Context context) {
31 | super(context);
32 | }
33 |
34 | public PullToRefreshGridView(Context context, AttributeSet attrs) {
35 | super(context, attrs);
36 | }
37 |
38 | public PullToRefreshGridView(Context context, Mode mode) {
39 | super(context, mode);
40 | }
41 |
42 | public PullToRefreshGridView(Context context, Mode mode, AnimationStyle style) {
43 | super(context, mode, style);
44 | }
45 |
46 | @Override
47 | public final Orientation getPullToRefreshScrollDirection() {
48 | return Orientation.VERTICAL;
49 | }
50 |
51 | @Override
52 | protected final GridView createRefreshableView(Context context, AttributeSet attrs) {
53 | final GridView gv;
54 | if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
55 | gv = new InternalGridViewSDK9(context, attrs);
56 | } else {
57 | gv = new InternalGridView(context, attrs);
58 | }
59 |
60 | // Use Generated ID (from res/values/ids.xml)
61 | gv.setId(R.id.gridview);
62 | return gv;
63 | }
64 |
65 | class InternalGridView extends GridView implements EmptyViewMethodAccessor {
66 |
67 | public InternalGridView(Context context, AttributeSet attrs) {
68 | super(context, attrs);
69 | }
70 |
71 | @Override
72 | public void setEmptyView(View emptyView) {
73 | PullToRefreshGridView.this.setEmptyView(emptyView);
74 | }
75 |
76 | @Override
77 | public void setEmptyViewInternal(View emptyView) {
78 | super.setEmptyView(emptyView);
79 | }
80 | }
81 |
82 | @TargetApi(9)
83 | final class InternalGridViewSDK9 extends InternalGridView {
84 |
85 | public InternalGridViewSDK9(Context context, AttributeSet attrs) {
86 | super(context, attrs);
87 | }
88 |
89 | @Override
90 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX,
91 | int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
92 |
93 | final boolean returnValue = super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX,
94 | scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent);
95 |
96 | // Does all of the hard work...
97 | OverscrollHelper.overScrollBy(PullToRefreshGridView.this, deltaX, scrollX, deltaY, scrollY, isTouchEvent);
98 |
99 | return returnValue;
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/PullToRefreshHorizontalScrollView.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.util.AttributeSet;
23 | import android.view.View;
24 | import android.widget.HorizontalScrollView;
25 |
26 | public class PullToRefreshHorizontalScrollView extends PullToRefreshBase {
27 |
28 | public PullToRefreshHorizontalScrollView(Context context) {
29 | super(context);
30 | }
31 |
32 | public PullToRefreshHorizontalScrollView(Context context, AttributeSet attrs) {
33 | super(context, attrs);
34 | }
35 |
36 | public PullToRefreshHorizontalScrollView(Context context, Mode mode) {
37 | super(context, mode);
38 | }
39 |
40 | public PullToRefreshHorizontalScrollView(Context context, Mode mode, AnimationStyle style) {
41 | super(context, mode, style);
42 | }
43 |
44 | @Override
45 | public final Orientation getPullToRefreshScrollDirection() {
46 | return Orientation.HORIZONTAL;
47 | }
48 |
49 | @Override
50 | protected HorizontalScrollView createRefreshableView(Context context, AttributeSet attrs) {
51 | HorizontalScrollView scrollView;
52 |
53 | if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
54 | scrollView = new InternalHorizontalScrollViewSDK9(context, attrs);
55 | } else {
56 | scrollView = new HorizontalScrollView(context, attrs);
57 | }
58 |
59 | scrollView.setId(R.id.scrollview);
60 | return scrollView;
61 | }
62 |
63 | @Override
64 | protected boolean isReadyForPullStart() {
65 | return mRefreshableView.getScrollX() == 0;
66 | }
67 |
68 | @Override
69 | protected boolean isReadyForPullEnd() {
70 | View scrollViewChild = mRefreshableView.getChildAt(0);
71 | if (null != scrollViewChild) {
72 | return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
73 | }
74 | return false;
75 | }
76 |
77 | @TargetApi(9)
78 | final class InternalHorizontalScrollViewSDK9 extends HorizontalScrollView {
79 |
80 | public InternalHorizontalScrollViewSDK9(Context context, AttributeSet attrs) {
81 | super(context, attrs);
82 | }
83 |
84 | @Override
85 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX,
86 | int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
87 |
88 | final boolean returnValue = super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX,
89 | scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent);
90 |
91 | // Does all of the hard work...
92 | OverscrollHelper.overScrollBy(PullToRefreshHorizontalScrollView.this, deltaX, scrollX, deltaY, scrollY,
93 | getScrollRange(), isTouchEvent);
94 |
95 | return returnValue;
96 | }
97 |
98 | /**
99 | * Taken from the AOSP ScrollView source
100 | */
101 | private int getScrollRange() {
102 | int scrollRange = 0;
103 | if (getChildCount() > 0) {
104 | View child = getChildAt(0);
105 | scrollRange = Math.max(0, child.getWidth() - (getWidth() - getPaddingLeft() - getPaddingRight()));
106 | }
107 | return scrollRange;
108 | }
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/PullToRefreshScrollView.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.util.AttributeSet;
23 | import android.view.View;
24 | import android.widget.ScrollView;
25 |
26 | public class PullToRefreshScrollView extends PullToRefreshBase {
27 |
28 | public PullToRefreshScrollView(Context context) {
29 | super(context);
30 | }
31 |
32 | public PullToRefreshScrollView(Context context, AttributeSet attrs) {
33 | super(context, attrs);
34 | }
35 |
36 | public PullToRefreshScrollView(Context context, Mode mode) {
37 | super(context, mode);
38 | }
39 |
40 | public PullToRefreshScrollView(Context context, Mode mode, AnimationStyle style) {
41 | super(context, mode, style);
42 | }
43 |
44 | @Override
45 | public final Orientation getPullToRefreshScrollDirection() {
46 | return Orientation.VERTICAL;
47 | }
48 |
49 | @Override
50 | protected ScrollView createRefreshableView(Context context, AttributeSet attrs) {
51 | ScrollView scrollView;
52 | if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
53 | scrollView = new InternalScrollViewSDK9(context, attrs);
54 | } else {
55 | scrollView = new ScrollView(context, attrs);
56 | }
57 |
58 | scrollView.setId(R.id.scrollview);
59 | return scrollView;
60 | }
61 |
62 | @Override
63 | protected boolean isReadyForPullStart() {
64 | return mRefreshableView.getScrollY() == 0;
65 | }
66 |
67 | @Override
68 | protected boolean isReadyForPullEnd() {
69 | View scrollViewChild = mRefreshableView.getChildAt(0);
70 | if (null != scrollViewChild) {
71 | return mRefreshableView.getScrollY() >= (scrollViewChild.getHeight() - getHeight());
72 | }
73 | return false;
74 | }
75 |
76 | @TargetApi(9)
77 | final class InternalScrollViewSDK9 extends ScrollView {
78 |
79 | public InternalScrollViewSDK9(Context context, AttributeSet attrs) {
80 | super(context, attrs);
81 | }
82 |
83 | @Override
84 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX,
85 | int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
86 |
87 | final boolean returnValue = super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX,
88 | scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent);
89 |
90 | // Does all of the hard work...
91 | OverscrollHelper.overScrollBy(PullToRefreshScrollView.this, deltaX, scrollX, deltaY, scrollY,
92 | getScrollRange(), isTouchEvent);
93 |
94 | return returnValue;
95 | }
96 |
97 | /**
98 | * Taken from the AOSP ScrollView source
99 | */
100 | private int getScrollRange() {
101 | int scrollRange = 0;
102 | if (getChildCount() > 0) {
103 | View child = getChildAt(0);
104 | scrollRange = Math.max(0, child.getHeight() - (getHeight() - getPaddingBottom() - getPaddingTop()));
105 | }
106 | return scrollRange;
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/extras/PullToRefreshWebView2.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.extras;
17 |
18 | import java.util.concurrent.atomic.AtomicBoolean;
19 |
20 | import android.content.Context;
21 | import android.util.AttributeSet;
22 | import android.webkit.WebView;
23 |
24 | import com.handmark.pulltorefresh.library.PullToRefreshWebView;
25 |
26 | /**
27 | * An advanced version of {@link PullToRefreshWebView} which delegates the
28 | * triggering of the PullToRefresh gesture to the Javascript running within the
29 | * WebView. This means that you should only use this class if:
30 | *
31 | *
32 | * - {@link PullToRefreshWebView} doesn't work correctly because you're using
33 | *
overflow:scroll
or something else which means
34 | * {@link WebView#getScrollY()} doesn't return correct values.
35 | * - You control the web content being displayed, as you need to write some
36 | * Javascript callbacks.
37 | *
38 | *
39 | *
40 | * The way this call works is that when a PullToRefresh gesture is in action,
41 | * the following Javascript methods will be called:
42 | * isReadyForPullDown()
and isReadyForPullUp()
, it is
43 | * your job to calculate whether the view is in a state where a PullToRefresh
44 | * can happen, and return the result via the callback mechanism. An example can
45 | * be seen below:
46 | *
47 | *
48 | *
49 | * function isReadyForPullDown() {
50 | * var result = ... // Probably using the .scrollTop DOM attribute
51 | * ptr.isReadyForPullDownResponse(result);
52 | * }
53 | *
54 | * function isReadyForPullUp() {
55 | * var result = ... // Probably using the .scrollBottom DOM attribute
56 | * ptr.isReadyForPullUpResponse(result);
57 | * }
58 | *
59 | *
60 | * @author Chris Banes
61 | */
62 | public class PullToRefreshWebView2 extends PullToRefreshWebView {
63 |
64 | static final String JS_INTERFACE_PKG = "ptr";
65 | static final String DEF_JS_READY_PULL_DOWN_CALL = "javascript:isReadyForPullDown();";
66 | static final String DEF_JS_READY_PULL_UP_CALL = "javascript:isReadyForPullUp();";
67 |
68 | public PullToRefreshWebView2(Context context) {
69 | super(context);
70 | }
71 |
72 | public PullToRefreshWebView2(Context context, AttributeSet attrs) {
73 | super(context, attrs);
74 | }
75 |
76 | public PullToRefreshWebView2(Context context, Mode mode) {
77 | super(context, mode);
78 | }
79 |
80 | private JsValueCallback mJsCallback;
81 | private final AtomicBoolean mIsReadyForPullDown = new AtomicBoolean(false);
82 | private final AtomicBoolean mIsReadyForPullUp = new AtomicBoolean(false);
83 |
84 | @Override
85 | protected WebView createRefreshableView(Context context, AttributeSet attrs) {
86 | WebView webView = super.createRefreshableView(context, attrs);
87 |
88 | // Need to add JS Interface so we can get the response back
89 | mJsCallback = new JsValueCallback();
90 | webView.addJavascriptInterface(mJsCallback, JS_INTERFACE_PKG);
91 |
92 | return webView;
93 | }
94 |
95 | @Override
96 | protected boolean isReadyForPullStart() {
97 | // Call Javascript...
98 | getRefreshableView().loadUrl(DEF_JS_READY_PULL_DOWN_CALL);
99 |
100 | // Response will be given to JsValueCallback, which will update
101 | // mIsReadyForPullDown
102 |
103 | return mIsReadyForPullDown.get();
104 | }
105 |
106 | @Override
107 | protected boolean isReadyForPullEnd() {
108 | // Call Javascript...
109 | getRefreshableView().loadUrl(DEF_JS_READY_PULL_UP_CALL);
110 |
111 | // Response will be given to JsValueCallback, which will update
112 | // mIsReadyForPullUp
113 |
114 | return mIsReadyForPullUp.get();
115 | }
116 |
117 | /**
118 | * Used for response from Javascript
119 | *
120 | * @author Chris Banes
121 | */
122 | final class JsValueCallback {
123 |
124 | public void isReadyForPullUpResponse(boolean response) {
125 | mIsReadyForPullUp.set(response);
126 | }
127 |
128 | public void isReadyForPullDownResponse(boolean response) {
129 | mIsReadyForPullDown.set(response);
130 | }
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/extras/SoundPullEventListener.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.extras;
17 |
18 | import java.util.HashMap;
19 |
20 | import android.content.Context;
21 | import android.media.MediaPlayer;
22 | import android.view.View;
23 |
24 | import com.handmark.pulltorefresh.library.PullToRefreshBase;
25 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
26 | import com.handmark.pulltorefresh.library.PullToRefreshBase.State;
27 |
28 | public class SoundPullEventListener implements PullToRefreshBase.OnPullEventListener {
29 |
30 | private final Context mContext;
31 | private final HashMap mSoundMap;
32 |
33 | private MediaPlayer mCurrentMediaPlayer;
34 |
35 | /**
36 | * Constructor
37 | *
38 | * @param context - Context
39 | */
40 | public SoundPullEventListener(Context context) {
41 | mContext = context;
42 | mSoundMap = new HashMap();
43 | }
44 |
45 | @Override
46 | public final void onPullEvent(PullToRefreshBase refreshView, State event, Mode direction) {
47 | Integer soundResIdObj = mSoundMap.get(event);
48 | if (null != soundResIdObj) {
49 | playSound(soundResIdObj.intValue());
50 | }
51 | }
52 |
53 | /**
54 | * Set the Sounds to be played when a Pull Event happens. You specify which
55 | * sound plays for which events by calling this method multiple times for
56 | * each event.
57 | *
58 | * If you've already set a sound for a certain event, and add another sound
59 | * for that event, only the new sound will be played.
60 | *
61 | * @param event - The event for which the sound will be played.
62 | * @param resId - Resource Id of the sound file to be played (e.g.
63 | * R.raw.pull_sound)
64 | */
65 | public void addSoundEvent(State event, int resId) {
66 | mSoundMap.put(event, resId);
67 | }
68 |
69 | /**
70 | * Clears all of the previously set sounds and events.
71 | */
72 | public void clearSounds() {
73 | mSoundMap.clear();
74 | }
75 |
76 | /**
77 | * Gets the current (or last) MediaPlayer instance.
78 | */
79 | public MediaPlayer getCurrentMediaPlayer() {
80 | return mCurrentMediaPlayer;
81 | }
82 |
83 | private void playSound(int resId) {
84 | // Stop current player, if there's one playing
85 | if (null != mCurrentMediaPlayer) {
86 | mCurrentMediaPlayer.stop();
87 | mCurrentMediaPlayer.release();
88 | }
89 |
90 | mCurrentMediaPlayer = MediaPlayer.create(mContext, resId);
91 | if (null != mCurrentMediaPlayer) {
92 | mCurrentMediaPlayer.start();
93 | }
94 | }
95 |
96 | }
97 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/internal/EmptyViewMethodAccessor.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.internal;
17 |
18 | import android.view.View;
19 |
20 | /**
21 | * Interface that allows PullToRefreshBase to hijack the call to
22 | * AdapterView.setEmptyView()
23 | *
24 | * @author chris
25 | */
26 | public interface EmptyViewMethodAccessor {
27 |
28 | /**
29 | * Calls upto AdapterView.setEmptyView()
30 | *
31 | * @param emptyView - to set as Empty View
32 | */
33 | public void setEmptyViewInternal(View emptyView);
34 |
35 | /**
36 | * Should call PullToRefreshBase.setEmptyView() which will then
37 | * automatically call through to setEmptyViewInternal()
38 | *
39 | * @param emptyView - to set as Empty View
40 | */
41 | public void setEmptyView(View emptyView);
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/internal/FlipLoadingLayout.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.internal;
17 |
18 | import android.annotation.SuppressLint;
19 | import android.content.Context;
20 | import android.content.res.TypedArray;
21 | import android.graphics.Matrix;
22 | import android.graphics.drawable.Drawable;
23 | import android.view.View;
24 | import android.view.ViewGroup;
25 | import android.view.animation.Animation;
26 | import android.view.animation.RotateAnimation;
27 | import android.widget.ImageView.ScaleType;
28 |
29 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
30 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Orientation;
31 | import com.handmark.pulltorefresh.library.R;
32 |
33 | @SuppressLint("ViewConstructor")
34 | public class FlipLoadingLayout extends LoadingLayout {
35 |
36 | static final int FLIP_ANIMATION_DURATION = 150;
37 |
38 | private final Animation mRotateAnimation, mResetRotateAnimation;
39 |
40 | public FlipLoadingLayout(Context context, final Mode mode, final Orientation scrollDirection, TypedArray attrs) {
41 | super(context, mode, scrollDirection, attrs);
42 |
43 | final int rotateAngle = mode == Mode.PULL_FROM_START ? -180 : 180;
44 |
45 | mRotateAnimation = new RotateAnimation(0, rotateAngle, Animation.RELATIVE_TO_SELF, 0.5f,
46 | Animation.RELATIVE_TO_SELF, 0.5f);
47 | mRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
48 | mRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
49 | mRotateAnimation.setFillAfter(true);
50 |
51 | mResetRotateAnimation = new RotateAnimation(rotateAngle, 0, Animation.RELATIVE_TO_SELF, 0.5f,
52 | Animation.RELATIVE_TO_SELF, 0.5f);
53 | mResetRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
54 | mResetRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
55 | mResetRotateAnimation.setFillAfter(true);
56 | }
57 |
58 | @Override
59 | protected void onLoadingDrawableSet(Drawable imageDrawable) {
60 | if (null != imageDrawable) {
61 | final int dHeight = imageDrawable.getIntrinsicHeight();
62 | final int dWidth = imageDrawable.getIntrinsicWidth();
63 |
64 | /**
65 | * We need to set the width/height of the ImageView so that it is
66 | * square with each side the size of the largest drawable dimension.
67 | * This is so that it doesn't clip when rotated.
68 | */
69 | ViewGroup.LayoutParams lp = mHeaderImage.getLayoutParams();
70 | lp.width = lp.height = Math.max(dHeight, dWidth);
71 | mHeaderImage.requestLayout();
72 |
73 | /**
74 | * We now rotate the Drawable so that is at the correct rotation,
75 | * and is centered.
76 | */
77 | mHeaderImage.setScaleType(ScaleType.MATRIX);
78 | Matrix matrix = new Matrix();
79 | matrix.postTranslate((lp.width - dWidth) / 2f, (lp.height - dHeight) / 2f);
80 | matrix.postRotate(getDrawableRotationAngle(), lp.width / 2f, lp.height / 2f);
81 | mHeaderImage.setImageMatrix(matrix);
82 | }
83 | }
84 |
85 | @Override
86 | protected void onPullImpl(float scaleOfLayout) {
87 | // NO-OP
88 | }
89 |
90 | @Override
91 | protected void pullToRefreshImpl() {
92 | // Only start reset Animation, we've previously show the rotate anim
93 | if (mRotateAnimation == mHeaderImage.getAnimation()) {
94 | mHeaderImage.startAnimation(mResetRotateAnimation);
95 | }
96 | }
97 |
98 | @Override
99 | protected void refreshingImpl() {
100 | mHeaderImage.clearAnimation();
101 | mHeaderImage.setVisibility(View.INVISIBLE);
102 | mHeaderProgress.setVisibility(View.VISIBLE);
103 | }
104 |
105 | @Override
106 | protected void releaseToRefreshImpl() {
107 | mHeaderImage.startAnimation(mRotateAnimation);
108 | }
109 |
110 | @Override
111 | protected void resetImpl() {
112 | mHeaderImage.clearAnimation();
113 | mHeaderProgress.setVisibility(View.GONE);
114 | mHeaderImage.setVisibility(View.VISIBLE);
115 | }
116 |
117 | @Override
118 | protected int getDefaultDrawableResId() {
119 | return R.drawable.default_ptr_flip;
120 | }
121 |
122 | private float getDrawableRotationAngle() {
123 | float angle = 0f;
124 | switch (mMode) {
125 | case PULL_FROM_END:
126 | if (mScrollDirection == Orientation.HORIZONTAL) {
127 | angle = 90f;
128 | } else {
129 | angle = 180f;
130 | }
131 | break;
132 |
133 | case PULL_FROM_START:
134 | if (mScrollDirection == Orientation.HORIZONTAL) {
135 | angle = 270f;
136 | }
137 | break;
138 |
139 | default:
140 | break;
141 | }
142 |
143 | return angle;
144 | }
145 |
146 | }
147 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/internal/RotateLoadingLayout.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.internal;
17 |
18 | import android.content.Context;
19 | import android.content.res.TypedArray;
20 | import android.graphics.Matrix;
21 | import android.graphics.drawable.Drawable;
22 | import android.view.animation.Animation;
23 | import android.view.animation.RotateAnimation;
24 | import android.widget.ImageView.ScaleType;
25 |
26 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
27 | import com.handmark.pulltorefresh.library.PullToRefreshBase.Orientation;
28 | import com.handmark.pulltorefresh.library.R;
29 |
30 | public class RotateLoadingLayout extends LoadingLayout {
31 |
32 | static final int ROTATION_ANIMATION_DURATION = 1200;
33 |
34 | private final Animation mRotateAnimation;
35 | private final Matrix mHeaderImageMatrix;
36 |
37 | private float mRotationPivotX, mRotationPivotY;
38 |
39 | private final boolean mRotateDrawableWhilePulling;
40 |
41 | public RotateLoadingLayout(Context context, Mode mode, Orientation scrollDirection, TypedArray attrs) {
42 | super(context, mode, scrollDirection, attrs);
43 |
44 | mRotateDrawableWhilePulling = attrs.getBoolean(R.styleable.PullToRefresh_ptrRotateDrawableWhilePulling, true);
45 |
46 | mHeaderImage.setScaleType(ScaleType.MATRIX);
47 | mHeaderImageMatrix = new Matrix();
48 | mHeaderImage.setImageMatrix(mHeaderImageMatrix);
49 |
50 | mRotateAnimation = new RotateAnimation(0, 720, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
51 | 0.5f);
52 | mRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
53 | mRotateAnimation.setDuration(ROTATION_ANIMATION_DURATION);
54 | mRotateAnimation.setRepeatCount(Animation.INFINITE);
55 | mRotateAnimation.setRepeatMode(Animation.RESTART);
56 | }
57 |
58 | public void onLoadingDrawableSet(Drawable imageDrawable) {
59 | if (null != imageDrawable) {
60 | mRotationPivotX = Math.round(imageDrawable.getIntrinsicWidth() / 2f);
61 | mRotationPivotY = Math.round(imageDrawable.getIntrinsicHeight() / 2f);
62 | }
63 | }
64 |
65 | protected void onPullImpl(float scaleOfLayout) {
66 | float angle;
67 | if (mRotateDrawableWhilePulling) {
68 | angle = scaleOfLayout * 90f;
69 | } else {
70 | angle = Math.max(0f, Math.min(180f, scaleOfLayout * 360f - 180f));
71 | }
72 |
73 | mHeaderImageMatrix.setRotate(angle, mRotationPivotX, mRotationPivotY);
74 | mHeaderImage.setImageMatrix(mHeaderImageMatrix);
75 | }
76 |
77 | @Override
78 | protected void refreshingImpl() {
79 | mHeaderImage.startAnimation(mRotateAnimation);
80 | }
81 |
82 | @Override
83 | protected void resetImpl() {
84 | mHeaderImage.clearAnimation();
85 | resetImageRotation();
86 | }
87 |
88 | private void resetImageRotation() {
89 | if (null != mHeaderImageMatrix) {
90 | mHeaderImageMatrix.reset();
91 | mHeaderImage.setImageMatrix(mHeaderImageMatrix);
92 | }
93 | }
94 |
95 | @Override
96 | protected void pullToRefreshImpl() {
97 | // NO-OP
98 | }
99 |
100 | @Override
101 | protected void releaseToRefreshImpl() {
102 | // NO-OP
103 | }
104 |
105 | @Override
106 | protected int getDefaultDrawableResId() {
107 | return R.drawable.image_loading;
108 | }
109 |
110 | }
111 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/internal/Utils.java:
--------------------------------------------------------------------------------
1 | package com.handmark.pulltorefresh.library.internal;
2 |
3 | import android.util.Log;
4 |
5 | public class Utils {
6 |
7 | static final String LOG_TAG = "PullToRefresh";
8 |
9 | public static void warnDeprecation(String depreacted, String replacement) {
10 | Log.w(LOG_TAG, "You're using the deprecated " + depreacted + " attr, please switch over to " + replacement);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/com/handmark/pulltorefresh/library/internal/ViewCompat.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.handmark.pulltorefresh.library.internal;
17 |
18 | import android.annotation.TargetApi;
19 | import android.graphics.drawable.Drawable;
20 | import android.os.Build.VERSION;
21 | import android.os.Build.VERSION_CODES;
22 | import android.view.View;
23 |
24 | @SuppressWarnings("deprecation")
25 | public class ViewCompat {
26 |
27 | public static void postOnAnimation(View view, Runnable runnable) {
28 | if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
29 | SDK16.postOnAnimation(view, runnable);
30 | } else {
31 | view.postDelayed(runnable, 16);
32 | }
33 | }
34 |
35 | public static void setBackground(View view, Drawable background) {
36 | if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
37 | SDK16.setBackground(view, background);
38 | } else {
39 | view.setBackgroundDrawable(background);
40 | }
41 | }
42 |
43 | public static void setLayerType(View view, int layerType) {
44 | if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
45 | SDK11.setLayerType(view, layerType);
46 | }
47 | }
48 |
49 | @TargetApi(11)
50 | static class SDK11 {
51 |
52 | public static void setLayerType(View view, int layerType) {
53 | view.setLayerType(layerType, null);
54 | }
55 | }
56 |
57 | @TargetApi(16)
58 | static class SDK16 {
59 |
60 | public static void postOnAnimation(View view, Runnable runnable) {
61 | view.postOnAnimation(runnable);
62 | }
63 |
64 | public static void setBackground(View view, Drawable background) {
65 | view.setBackground(background);
66 | }
67 |
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------