diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 23130df..bfa7d8f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -481,7 +481,7 @@
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.TranslucentActionBar"
- android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
+ android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
-
+ android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/activity_ptr_expandable_list.xml b/res/layout/activity_ptr_expandable_list.xml
new file mode 100644
index 0000000..f4e337a
--- /dev/null
+++ b/res/layout/activity_ptr_expandable_list.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_ptr_grid.xml b/res/layout/activity_ptr_grid.xml
new file mode 100644
index 0000000..7ac97ad
--- /dev/null
+++ b/res/layout/activity_ptr_grid.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_ptr_horizontalscrollview.xml b/res/layout/activity_ptr_horizontalscrollview.xml
new file mode 100644
index 0000000..e37e9f8
--- /dev/null
+++ b/res/layout/activity_ptr_horizontalscrollview.xml
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_ptr_list.xml b/res/layout/activity_ptr_list.xml
new file mode 100644
index 0000000..a3b5561
--- /dev/null
+++ b/res/layout/activity_ptr_list.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_ptr_list_fragment.xml b/res/layout/activity_ptr_list_fragment.xml
new file mode 100644
index 0000000..eb9c1c2
--- /dev/null
+++ b/res/layout/activity_ptr_list_fragment.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_ptr_list_in_vp.xml b/res/layout/activity_ptr_list_in_vp.xml
new file mode 100644
index 0000000..a047376
--- /dev/null
+++ b/res/layout/activity_ptr_list_in_vp.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_ptr_scrollview.xml b/res/layout/activity_ptr_scrollview.xml
new file mode 100644
index 0000000..9b08062
--- /dev/null
+++ b/res/layout/activity_ptr_scrollview.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_ptr_viewpager.xml b/res/layout/activity_ptr_viewpager.xml
new file mode 100644
index 0000000..15924da
--- /dev/null
+++ b/res/layout/activity_ptr_viewpager.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_ptr_webview.xml b/res/layout/activity_ptr_webview.xml
new file mode 100644
index 0000000..309cf46
--- /dev/null
+++ b/res/layout/activity_ptr_webview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/activity_ptr_webview2.xml b/res/layout/activity_ptr_webview2.xml
new file mode 100644
index 0000000..541d872
--- /dev/null
+++ b/res/layout/activity_ptr_webview2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/layout_listview_in_viewpager.xml b/res/layout/layout_listview_in_viewpager.xml
new file mode 100644
index 0000000..3bfc689
--- /dev/null
+++ b/res/layout/layout_listview_in_viewpager.xml
@@ -0,0 +1,6 @@
+
+
diff --git a/res/raw/pull_event.mp3 b/res/raw/pull_event.mp3
new file mode 100644
index 0000000..075ad08
Binary files /dev/null and b/res/raw/pull_event.mp3 differ
diff --git a/res/raw/refreshing_sound.mp3 b/res/raw/refreshing_sound.mp3
new file mode 100644
index 0000000..9ebe0b6
Binary files /dev/null and b/res/raw/refreshing_sound.mp3 differ
diff --git a/res/raw/reset_sound.mp3 b/res/raw/reset_sound.mp3
new file mode 100644
index 0000000..8e4c9e3
Binary files /dev/null and b/res/raw/reset_sound.mp3 differ
diff --git a/res/values/strings_sample.xml b/res/values/strings_sample.xml
index f78ee62..2ab3dbc 100644
--- a/res/values/strings_sample.xml
+++ b/res/values/strings_sample.xml
@@ -22,6 +22,7 @@
水平/垂直滚动+首行首列固定+翻页Listview
下拉ScrollView背景回弹效果
FadingActionBar官方DEMO
+ PullToReresh官方DEMO
@@ -151,5 +152,9 @@
Choose a city
Change dataset
WebView sample
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sollicitudin mauris varius lacus porttitor eget blandit massa facilisis. Nulla pellentesque odio sed purus fermentum vitae viverra orci faucibus. Sed ullamcorper condimentum vulputate. Curabitur sit amet convallis velit. Vestibulum posuere eleifend risus ac adipiscing. Nam pulvinar nulla a velit faucibus imperdiet. Praesent eget nisi ac justo blandit sagittis. Maecenas at leo nisi, nec varius nisl.\nIn hac habitasse platea dictumst. Morbi neque tortor, vestibulum sed viverra a, luctus vel lorem. Nunc turpis eros, varius eget commodo et, euismod at eros. Sed tincidunt mi purus, vel posuere dui. Vestibulum ante lectus, porta sed mattis bibendum, scelerisque cursus sapien. Cras ultrices imperdiet fermentum. Aenean nisi nulla, euismod non blandit ac, dictum quis libero. Morbi consectetur tempor mollis. Suspendisse eget nunc arcu, vel ullamcorper augue. Integer malesuada, diam nec faucibus mollis, nisl velit euismod enim, ac mattis justo neque sit amet mauris. Vivamus pretium imperdiet pharetra.\nInteger sagittis augue sit amet lectus pulvinar sit amet commodo tortor mattis. Maecenas quis tellus eget ante eleifend sollicitudin non et nibh. Maecenas luctus euismod tristique. Fusce in odio nec diam blandit facilisis. Sed nec arcu eros. Vivamus quis tortor a metus tempus aliquam eget volutpat magna. Pellentesque id ultrices dolor. Sed blandit aliquet quam. Phasellus dapibus euismod vulputate. Aenean blandit, elit vitae vestibulum tincidunt, metus dui accumsan nulla, sit amet vehicula mauris lacus in est. Etiam dignissim pellentesque nulla vel malesuada. Cras vel lorem justo.\nSed condimentum nisl sit amet libero vestibulum hendrerit. Duis auctor tempus placerat. Proin velit ante, ornare nec dictum nec, hendrerit eu arcu. Etiam ut diam ornare quam venenatis pulvinar vitae vel leo. Vivamus consectetur, ante id interdum rhoncus, magna eros pulvinar lacus, a gravida nibh arcu vitae eros. Nulla scelerisque laoreet feugiat. Mauris sit amet gravida felis.\nNulla ac dolor sapien, vestibulum venenatis justo. Cras placerat velit vitae nibh pellentesque ultricies. Suspendisse adipiscing enim eu justo iaculis eu pretium urna fermentum. Duis porttitor nunc non nunc mattis vestibulum. Etiam elit tellus, feugiat in bibendum eget, adipiscing nec metus. Ut ut sem lacus, quis faucibus diam. Curabitur a nulla fermentum tortor dignissim posuere. Fusce faucibus ante ut sem imperdiet imperdiet eget vitae lorem. Etiam fringilla ornare ipsum, in sagittis quam ornare vitae. Nullam venenatis orci sit amet sapien adipiscing gravida. Proin turpis lectus, hendrerit vitae vehicula ut, auctor ac lectus. Pellentesque sollicitudin blandit ligula quis commodo. Mauris vulputate lectus in velit luctus aliquam. Quisque eget tincidunt elit. Quisque et augue quam, sed scelerisque eros.
+
\ No newline at end of file
diff --git a/res/values/styles_sample.xml b/res/values/styles_sample.xml
index 9ac8b1b..f6d5924 100644
--- a/res/values/styles_sample.xml
+++ b/res/values/styles_sample.xml
@@ -119,5 +119,14 @@
- true
- @null
+
+
+
\ No newline at end of file
diff --git a/src/com/zftlive/android/sample/fadingactionbar/HeaderOverlayActivity.java b/src/com/zftlive/android/sample/fadingactionbar/HeaderOverlayActivity.java
index 9cdc7c2..a23bc9e 100644
--- a/src/com/zftlive/android/sample/fadingactionbar/HeaderOverlayActivity.java
+++ b/src/com/zftlive/android/sample/fadingactionbar/HeaderOverlayActivity.java
@@ -51,7 +51,7 @@ public class HeaderOverlayActivity extends Activity {
listView.setAdapter(adapter);
//初始化带返回按钮的标题栏
- ActionBarManager.initBackTitle(this, getActionBar(), "HeaderOverlayActivity");
+ ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName());
}
/**
diff --git a/src/com/zftlive/android/sample/pulltorefresh/LauncherActivity.java b/src/com/zftlive/android/sample/pulltorefresh/LauncherActivity.java
new file mode 100644
index 0000000..d66158f
--- /dev/null
+++ b/src/com/zftlive/android/sample/pulltorefresh/LauncherActivity.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright 2011, 2012 Chris Banes.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+package com.zftlive.android.sample.pulltorefresh;
+
+import com.zftlive.android.common.ActionBarManager;
+
+import android.app.ListActivity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+
+public class LauncherActivity extends ListActivity {
+
+ public static final String[] options = { "ListView", "ExpandableListView", "GridView", "WebView", "ScrollView",
+ "Horizontal ScrollView", "ViewPager", "ListView Fragment", "WebView Advanced", "ListView in ViewPager" };
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setListAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, options));
+ //初始化带返回按钮的标题栏
+ ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName());
+ }
+
+ @Override
+ protected void onListItemClick(ListView l, View v, int position, long id) {
+ Intent intent;
+
+ switch (position) {
+ default:
+ case 0:
+ intent = new Intent(this, PullToRefreshListActivity.class);
+ break;
+ case 1:
+ intent = new Intent(this, PullToRefreshExpandableListActivity.class);
+ break;
+ case 2:
+ intent = new Intent(this, PullToRefreshGridActivity.class);
+ break;
+ case 3:
+ intent = new Intent(this, PullToRefreshWebViewActivity.class);
+ break;
+ case 4:
+ intent = new Intent(this, PullToRefreshScrollViewActivity.class);
+ break;
+ case 5:
+ intent = new Intent(this, PullToRefreshHorizontalScrollViewActivity.class);
+ break;
+ case 6:
+ intent = new Intent(this, PullToRefreshViewPagerActivity.class);
+ break;
+ case 7:
+ intent = new Intent(this, PullToRefreshListFragmentActivity.class);
+ break;
+ case 8:
+ intent = new Intent(this, PullToRefreshWebView2Activity.class);
+ break;
+ case 9:
+ intent = new Intent(this, PullToRefreshListInViewPagerActivity.class);
+ break;
+ }
+
+ startActivity(intent);
+ }
+
+}
diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshExpandableListActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshExpandableListActivity.java
new file mode 100644
index 0000000..09e0c00
--- /dev/null
+++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshExpandableListActivity.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright 2011, 2012 Chris Banes.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+package com.zftlive.android.sample.pulltorefresh;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import android.app.ExpandableListActivity;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.widget.ExpandableListView;
+import android.widget.SimpleExpandableListAdapter;
+
+import com.zftlive.android.R;
+import com.zftlive.android.common.ActionBarManager;
+import com.zftlive.android.view.pulltorefresh.PullToRefreshBase;
+import com.zftlive.android.view.pulltorefresh.PullToRefreshBase.OnRefreshListener;
+import com.zftlive.android.view.pulltorefresh.PullToRefreshExpandableListView;
+
+public final class PullToRefreshExpandableListActivity extends ExpandableListActivity {
+ private static final String KEY = "key";
+
+ private List