├── .classpath ├── .gitignore ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── README.md ├── build.gradle ├── proguard.cfg ├── project.properties ├── res ├── anim │ └── listanim.xml ├── drawable-hdpi │ ├── default_ptr_flip_bottom.png │ ├── ic_launcher.png │ └── xlistview_arrow.png ├── drawable-ldpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── layout │ ├── ptr_header.xml │ ├── xlistview_footer.xml │ └── xlistview_header.xml └── values │ ├── ids.xml │ ├── ptr__attrs.xml │ ├── ptr__default_style.xml │ ├── strings.xml │ └── styles.xml └── src ├── com ├── emilsjolander │ └── components │ │ └── stickylistheaders │ │ ├── AdapterWrapper.java │ │ ├── CheckableWrapperView.java │ │ ├── SectionIndexerAdapterWrapper.java │ │ ├── StickyListHeadersAdapter.java │ │ ├── StickyListHeadersListView.java │ │ └── WrapperView.java ├── huewu │ └── pla │ │ └── lib │ │ ├── MultiColumnListView.java │ │ ├── MultiColumnPullToRefreshListView.java │ │ └── internal │ │ ├── PLA_AbsListView.java │ │ ├── PLA_AdapterView.java │ │ ├── PLA_HeaderViewListAdapter.java │ │ └── PLA_ListView.java ├── woozzu │ └── android │ │ └── widget │ │ ├── IndexScroller.java │ │ └── IndexableListView.java └── youxiachai │ └── onexlistview │ ├── XIndexableView.java │ ├── XMultiColumnListView.java │ ├── XStickyListHeadersIndexableView.java │ ├── XStickyListHeadersView.java │ └── util │ └── StringMatcher.java └── me └── maxwin └── view ├── IXListViewLoadMore.java ├── IXListViewRefreshListener.java ├── IXScrollListener.java ├── XListView.java ├── XListViewFooter.java └── XListViewHeader.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /gen 2 | /bin 3 | /build 4 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | XListView 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 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 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 5 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #android OneXlistview 1.1.0 说明# 2 | 3 | 4 | ##changelog## 5 | 2013-05-13 6 | bugfix: XMultiColumnListView pull listener 7 | improve: xListview stoprefresh methond 8 | 9 | 2013-05-12 10 | 11 | update sticklistview 12 | 13 | many bug fix xListview 14 | 15 | improve xlistview refresh loadmore listener 16 | 17 | ##原始组件说明## 18 | 整合和扩展了如下项目 19 | 20 | 21 | 1. [XListview](https://github.com/Maxwin-z/XListView-Android) 22 | > 上拉加载,下拉刷新,listview 23 | 24 | 2. [PinterestLikeAdapterView](https://github.com/huewu/PinterestLikeAdapterView) 25 | > 类似于pinterest瀑布流实现 26 | 27 | 3. [https://github.com/emilsjolander/StickyListHeaders](https://github.com/emilsjolander/StickyListHeaders) 28 | > 列表头部固定的 29 | 30 | 4. [https://github.com/woozzu/IndexableListView](https://github.com/woozzu/IndexableListView) 31 | > 列表快速索引 32 | 33 | **以上项目的版权声明均为 Apache License 2.0** 34 | 35 | ##扩展说明## 36 | 在这些原始项目,并不是所有项目都支持上拉加载,下拉刷新,于是,我在原始项目的基础上扩展出一系列XXlistview, 把xlistview上拉,下拉机制对相应项目进行改造,是这些原本不具备上拉,下拉机制的listview都拥有这个功能. 并且对原xlistview 的存在的bug 也进行了相应的修复. 37 | 38 | ###xListview changlog### 39 | bugfix: 刷新,加载更多,还没加载完毕的时候在进行上下拉导致的重复加载 40 | 41 | bugfix: item 数目不满一屏幕的时候显示更多加载按钮 42 | 43 | improve: 正在刷新,或者加载更多的时候不应该可以继续拉 44 | ##扩展的view## 45 | 以下view 如无特殊说明都支持上下拉 46 | 47 | 1. XIndexableView 48 | > 具有快速索引的listview 49 | 50 | 2. XMultiColumnListView 51 | > 扩展自原瀑布流 52 | 53 | 3. XStickyListHeadersIndexableView 54 | > 具有固定头部,且支持快速索引 55 | 56 | 4. XStickyListHeadersView 57 | > 固定头部 58 | 59 | ##使用## 60 | 要开启上下拉很简单 61 | 62 | 开启上拉 63 | 64 | `mListView.setPullLoadEnable(true);` 65 | 66 | 开启下拉(默认开启) 67 | 68 | `mListView.setPullRefreshEnable(true);` 69 | 70 | 监听器 71 | 72 | `mListView.setXListViewListener(this);` 73 | 74 | 由于demo 可能需要点时间,用法跟listview一样,等不及演示demo可以去看原项目的demo,基本没有区别. 75 | ##ToDo list## 76 | 1. 实现跟便捷的自定义上下拉view机制 77 | 2. 演示用demo 78 | 3. 写相应的文档 79 | 80 | Copyright 2012 youxiachai 81 | 82 | Licensed under the Apache License, Version 2.0 (the "License"); 83 | you may not use this file except in compliance with the License. 84 | You may obtain a copy of the License at 85 | 86 | http://www.apache.org/licenses/LICENSE-2.0 87 | 88 | Unless required by applicable law or agreed to in writing, software 89 | distributed under the License is distributed on an "AS IS" BASIS, 90 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 91 | See the License for the specific language governing permissions and 92 | limitations under the License. 93 | 94 | 95 | 96 | [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/youxiachai/onexlistview/trend.png)](https://bitdeli.com/free "Bitdeli Badge") 97 | 98 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | mavenCentral() 4 | } 5 | dependencies { 6 | classpath 'com.android.tools.build:gradle:0.5.+' 7 | } 8 | } 9 | apply plugin: 'android-library' 10 | 11 | dependencies { 12 | //compile fileTree(dir: 'libs', include: '*.jar') 13 | } 14 | 15 | android { 16 | compileSdkVersion 17 17 | buildToolsVersion "17.0.0" 18 | 19 | sourceSets { 20 | main { 21 | manifest.srcFile 'AndroidManifest.xml' 22 | java.srcDirs = ['src'] 23 | resources.srcDirs = ['src'] 24 | aidl.srcDirs = ['src'] 25 | renderscript.srcDirs = ['src'] 26 | res.srcDirs = ['res'] 27 | assets.srcDirs = ['assets'] 28 | } 29 | 30 | instrumentTest.setRoot('tests') 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembers class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembers class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers class * extends android.app.Activity { 30 | public void *(android.view.View); 31 | } 32 | 33 | -keepclassmembers enum * { 34 | public static **[] values(); 35 | public static ** valueOf(java.lang.String); 36 | } 37 | 38 | -keep class * implements android.os.Parcelable { 39 | public static final android.os.Parcelable$Creator *; 40 | } 41 | -------------------------------------------------------------------------------- /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-16 12 | android.library=true 13 | -------------------------------------------------------------------------------- /res/anim/listanim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /res/drawable-hdpi/default_ptr_flip_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/youxiachai/OneXListview/5463a55df2178626b4a2349fe83be0011d8ade25/res/drawable-hdpi/default_ptr_flip_bottom.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/youxiachai/OneXListview/5463a55df2178626b4a2349fe83be0011d8ade25/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-hdpi/xlistview_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/youxiachai/OneXListview/5463a55df2178626b4a2349fe83be0011d8ade25/res/drawable-hdpi/xlistview_arrow.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/youxiachai/OneXListview/5463a55df2178626b4a2349fe83be0011d8ade25/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/youxiachai/OneXListview/5463a55df2178626b4a2349fe83be0011d8ade25/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/layout/ptr_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 13 | 14 | 17 | 18 | 21 | 22 | 25 | 26 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /res/layout/xlistview_footer.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 18 | 19 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /res/layout/xlistview_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 18 | 19 | 24 | 25 | 29 | 30 | 35 | 36 | 41 | 42 | 43 | 44 | 52 | 53 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /res/values/ptr__default_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 15 | 16 | 22 | 23 | 30 | 31 | 38 | 39 | 48 | 49 | 56 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello World, XListViewActivity! 5 | XListView 6 | 下拉刷新 7 | 松开刷新数据 8 | 正在加载... 9 | 上次更新时间: 10 | 查看更多 11 | 松开载入更多 12 | 13 | Pull to refresh 14 | Release to refresh 15 | Refreshing 16 | Updated: %1$s 17 | 18 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |