Skip to content

Commit dee81bd

Browse files
committed
Pull to Refresh
0 parents  commit dee81bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1752
-0
lines changed

.classpath

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
4+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
5+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
6+
<classpathentry kind="src" path="src"/>
7+
<classpathentry kind="src" path="gen"/>
8+
<classpathentry kind="output" path="bin/classes"/>
9+
</classpath>

.project

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>PullToRefresh_MoreLoad_PerfectVersion</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.jdt.core.javabuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
</natures>
33+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8

.settings/org.eclipse.jdt.core.prefs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3+
org.eclipse.jdt.core.compiler.compliance=1.6
4+
org.eclipse.jdt.core.compiler.source=1.6

AndroidManifest.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.john.test"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="8"
9+
android:targetSdkVersion="17" />
10+
11+
<application
12+
android:allowBackup="true"
13+
android:icon="@drawable/ic_launcher"
14+
android:label="@string/app_name"
15+
android:theme="@style/AppTheme" >
16+
<activity
17+
android:name=".MainActivity"
18+
android:label="@string/app_name" >
19+
<intent-filter>
20+
<action android:name="android.intent.action.MAIN" />
21+
22+
<category android:name="android.intent.category.LAUNCHER" />
23+
</intent-filter>
24+
</activity>
25+
</application>
26+
27+
</manifest>

bin/AndroidManifest.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.john.test"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="8"
9+
android:targetSdkVersion="17" />
10+
11+
<application
12+
android:allowBackup="true"
13+
android:icon="@drawable/ic_launcher"
14+
android:label="@string/app_name"
15+
android:theme="@style/AppTheme" >
16+
<activity
17+
android:name=".MainActivity"
18+
android:label="@string/app_name" >
19+
<intent-filter>
20+
<action android:name="android.intent.action.MAIN" />
21+
22+
<category android:name="android.intent.category.LAUNCHER" />
23+
</intent-filter>
24+
</activity>
25+
</application>
26+
27+
</manifest>
243 KB
Binary file not shown.

bin/classes.dex

566 KB
Binary file not shown.
335 Bytes
Binary file not shown.
1.41 KB
Binary file not shown.
847 Bytes
Binary file not shown.
1.07 KB
Binary file not shown.
1.38 KB
Binary file not shown.
2.68 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
5.98 KB
Binary file not shown.
325 Bytes
Binary file not shown.
485 Bytes
Binary file not shown.
446 Bytes
Binary file not shown.
459 Bytes
Binary file not shown.

bin/classes/com/john/test/R$id.class

1.09 KB
Binary file not shown.
488 Bytes
Binary file not shown.
926 Bytes
Binary file not shown.
416 Bytes
Binary file not shown.

bin/classes/com/john/test/R.class

625 Bytes
Binary file not shown.
1.37 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

bin/jarlist.cache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# cache for current jar dependency. DO NOT EDIT.
2+
# format is <lastModified> <length> <SHA-1> <path>
3+
# Encoding is UTF-8
1.82 KB
5.82 KB
3.04 KB
9.14 KB
17.5 KB

bin/resources.ap_

46.9 KB
Binary file not shown.

gen/com/john/test/BuildConfig.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** Automatically generated file. DO NOT MODIFY */
2+
package com.john.test;
3+
4+
public final class BuildConfig {
5+
public final static boolean DEBUG = true;
6+
}

gen/com/john/test/R.java

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/* AUTO-GENERATED FILE. DO NOT MODIFY.
2+
*
3+
* This class was automatically generated by the
4+
* aapt tool from the resource data it found. It
5+
* should not be modified by hand.
6+
*/
7+
8+
package com.john.test;
9+
10+
public final class R {
11+
public static final class attr {
12+
}
13+
public static final class color {
14+
public static final int black=0x7f040000;
15+
public static final int gold=0x7f040002;
16+
public static final int pull_refresh_textview=0x7f040001;
17+
public static final int transparent=0x7f040003;
18+
}
19+
public static final class dimen {
20+
/** Default screen margins, per the Android Design guidelines.
21+
22+
Customize dimensions originally defined in res/values/dimens.xml (such as
23+
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
24+
25+
*/
26+
public static final int activity_horizontal_margin=0x7f050000;
27+
public static final int activity_vertical_margin=0x7f050001;
28+
}
29+
public static final class drawable {
30+
public static final int arrow=0x7f020000;
31+
public static final int ic_launcher=0x7f020001;
32+
public static final int progressbar_bg=0x7f020002;
33+
}
34+
public static final class id {
35+
public static final int appInfo=0x7f08000e;
36+
public static final int autoLoadMoreFlagBtn=0x7f080004;
37+
public static final int btnClick=0x7f080012;
38+
public static final int canLoadMoreFlagBtn=0x7f080003;
39+
public static final int canPullRefBtn=0x7f080002;
40+
public static final int flagLayout=0x7f080001;
41+
public static final int head_arrowImageView=0x7f080008;
42+
public static final int head_contentLayout=0x7f080007;
43+
public static final int head_lastUpdatedTextView=0x7f08000c;
44+
public static final int head_linetest=0x7f08000a;
45+
public static final int head_progressBar=0x7f080009;
46+
public static final int head_tipsTextView=0x7f08000b;
47+
public static final int isMoveToFirstItemBtn=0x7f080005;
48+
public static final int ivIcon=0x7f08000d;
49+
public static final int load_more=0x7f080014;
50+
public static final int mListView=0x7f080006;
51+
public static final int pull_to_refresh_progress=0x7f080013;
52+
public static final int titile=0x7f080000;
53+
public static final int tvName=0x7f08000f;
54+
public static final int tvSize=0x7f080011;
55+
public static final int tvVer=0x7f080010;
56+
}
57+
public static final class layout {
58+
public static final int activity_main=0x7f030000;
59+
public static final int head=0x7f030001;
60+
public static final int list_item=0x7f030002;
61+
public static final int listfooter_more=0x7f030003;
62+
}
63+
public static final class string {
64+
public static final int app_name=0x7f060000;
65+
public static final int image_desc=0x7f060009;
66+
public static final int mgr=0x7f06000c;
67+
public static final int name=0x7f06000d;
68+
public static final int p2refresh_doing_end_refresh=0x7f060007;
69+
public static final int p2refresh_doing_head_refresh=0x7f060006;
70+
public static final int p2refresh_end_click_load_more=0x7f060003;
71+
public static final int p2refresh_end_load_more=0x7f060002;
72+
public static final int p2refresh_head_load_more=0x7f060001;
73+
public static final int p2refresh_pull_to_refresh=0x7f060005;
74+
public static final int p2refresh_refresh_lasttime=0x7f060008;
75+
public static final int p2refresh_release_refresh=0x7f060004;
76+
public static final int size=0x7f06000b;
77+
public static final int ver=0x7f06000a;
78+
}
79+
public static final class style {
80+
/**
81+
Base application theme, dependent on API level. This theme is replaced
82+
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
83+
84+
85+
Theme customizations available in newer API levels can go in
86+
res/values-vXX/styles.xml, while customizations related to
87+
backward-compatibility can go here.
88+
89+
90+
Base application theme for API 11+. This theme completely replaces
91+
AppBaseTheme from res/values/styles.xml on API 11+ devices.
92+
93+
API 11 theme customizations can go here.
94+
95+
Base application theme for API 14+. This theme completely replaces
96+
AppBaseTheme from BOTH res/values/styles.xml and
97+
res/values-v11/styles.xml on API 14+ devices.
98+
99+
API 14 theme customizations can go here.
100+
*/
101+
public static final int AppBaseTheme=0x7f070000;
102+
/** Application theme.
103+
All customizations that are NOT specific to a particular API-level can go here.
104+
*/
105+
public static final int AppTheme=0x7f070001;
106+
}
107+
}

libs/android-support-v4.jar

473 KB
Binary file not shown.

proguard-project.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
#}

project.properties

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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 edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-19

res/drawable-hdpi/arrow.png

4.47 KB

res/drawable-hdpi/ic_launcher.png

7.48 KB

res/drawable-hdpi/progressbar_bg.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:fromDegrees="0"
4+
android:pivotX="50%"
5+
android:pivotY="50%"
6+
android:toDegrees="360" >
7+
8+
<shape
9+
android:innerRadiusRatio="3"
10+
android:shape="ring"
11+
android:thicknessRatio="8"
12+
android:useLevel="false" >
13+
<gradient
14+
android:centerColor="#FF7121"
15+
android:centerY="0.50"
16+
android:endColor="#FFFF00"
17+
android:startColor="#6BD3FF"
18+
android:type="sweep"
19+
android:useLevel="false" />
20+
</shape>
21+
22+
</animated-rotate>

res/drawable-mdpi/ic_launcher.png

3.69 KB

res/drawable-xhdpi/ic_launcher.png

12.2 KB

res/drawable-xxhdpi/ic_launcher.png

24.2 KB

res/layout/activity_main.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
tools:context=".MainActivity" >
6+
<TextView
7+
android:id="@+id/titile"
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content"
10+
android:text="按钮显示文字表示当前ListView的设置状态"
11+
android:gravity="center"/>
12+
<LinearLayout
13+
android:id="@+id/flagLayout"
14+
android:layout_width="match_parent"
15+
android:layout_height="wrap_content"
16+
android:layout_below="@id/titile"
17+
android:orientation="horizontal" >
18+
19+
<Button
20+
android:id="@+id/canPullRefBtn"
21+
android:layout_width="0dp"
22+
android:layout_height="wrap_content"
23+
android:layout_weight="1"
24+
android:text="启用下拉刷新"
25+
android:textSize="10sp" />
26+
27+
<Button
28+
android:id="@+id/canLoadMoreFlagBtn"
29+
android:layout_width="0dp"
30+
android:layout_height="wrap_content"
31+
android:layout_weight="1"
32+
android:text="启用加载更多"
33+
android:textSize="10sp" />
34+
35+
<Button
36+
android:id="@+id/autoLoadMoreFlagBtn"
37+
android:layout_width="0dp"
38+
android:layout_height="wrap_content"
39+
android:layout_weight="1"
40+
android:text="启用自动加载更多"
41+
android:textSize="10sp" />
42+
<Button
43+
android:id="@+id/isMoveToFirstItemBtn"
44+
android:layout_width="0dp"
45+
android:layout_height="wrap_content"
46+
android:layout_weight="1"
47+
android:text="关闭移动到第一条Item"
48+
android:textSize="10sp" />
49+
</LinearLayout>
50+
51+
<com.john.test.view.CustomListView
52+
android:id="@+id/mListView"
53+
android:layout_width="match_parent"
54+
android:layout_height="match_parent"
55+
android:layout_below="@id/flagLayout"
56+
android:cacheColorHint="@android:color/transparent"
57+
android:fadingEdgeLength="0dp" />
58+
59+
</RelativeLayout>

0 commit comments

Comments
 (0)