[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4132":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":16,"starSnapshotCount":16,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},4132,"android-Ultra-Pull-To-Refresh","liaohuqiu\u002Fandroid-Ultra-Pull-To-Refresh","liaohuqiu","Ultra Pull to Refresh for Android. Support all the views.","",null,"Java",9516,2627,434,150,0,66,"MIT License",false,"master",true,[],"2026-06-12 04:00:21","###### Welcome to follow me on GitHub or Twitter\n\nGitHub: https:\u002F\u002Fgithub.com\u002Fliaohuqiu\n\nTwitter: https:\u002F\u002Ftwitter.com\u002Fliaohuqiu\n\n---\n\n[![Build Status](https:\u002F\u002Ftravis-ci.org\u002Fliaohuqiu\u002Fandroid-Ultra-Pull-To-Refresh.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002Fliaohuqiu\u002Fandroid-Ultra-Pull-To-Refresh)\n[![Android Arsenal](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAndroid%20Arsenal-Ultra%20Pull%20To%20Refresh-brightgreen.svg?style=flat)](https:\u002F\u002Fandroid-arsenal.com\u002Fdetails\u002F1\u002F1180)\n\n#### [中文版文档](https:\u002F\u002Fgithub.com\u002Fliaohuqiu\u002Fandroid-Ultra-Pull-To-Refresh\u002Fblob\u002Fmaster\u002FREADME-cn.md)\n\nWanna auto-load-more? This will be what you want: https:\u002F\u002Fgithub.com\u002Fliaohuqiu\u002Fandroid-cube-app\n\n# Ultra Pull To Refresh\n\nIt's a replacement for the deprecated pull to refresh solution. It can contain any view you want.\n\nIt's easy to use and more powerful than SwipeRefreshLayout.\n\nIt's well designed, you can customize the UI effect you want as easy as adding a headview to ListView.\n\nSupport `API LEVEL >= 8`, all snapshots are taken from Genymotion, 2.3.7.\n\n[Download APK](https:\u002F\u002Fraw.githubusercontent.com\u002Fliaohuqiu\u002Fandroid-Ultra-Pull-To-Refresh\u002Fmaster\u002Fptr-demo.apk)\n\n* StoreHouse Style first! Thanks to [CBStoreHouseRefreshControl](https:\u002F\u002Fgithub.com\u002Fcoolbeet\u002FCBStoreHouseRefreshControl).\n    \u003Cdiv class='row'>\n        \u003Cimg src='http:\u002F\u002Fsrain-github.qiniudn.com\u002Fultra-ptr\u002Fstore-house-string-array.gif' width=\"300px\" style='border: #f1f1f1 solid 1px'\u002F>\n        \u003Cimg src='http:\u002F\u002Fsrain-github.qiniudn.com\u002Fultra-ptr\u002Fstore-house-string.gif' width=\"300px\" style='border: #f1f1f1 solid 1px'\u002F>\n    \u003C\u002Fdiv>\n\n* Material Style, added @ 2014-12-09. **There is a beautiful shadow which looks terrible in gif snapshot. Please Check out the DEMO.**\n    \u003Cdiv class='row'>\n        \u003Cimg src='http:\u002F\u002Fsrain-github.qiniudn.com\u002Fultra-ptr\u002Fmaterial-style.gif' width=\"300px\"\u002F>\n    \u003C\u002Fdiv>\n\n* **Supports all of the views**: \n    ListView, GridView, ScrollView, FrameLayout, or Even a single TextView.\n    \u003Cdiv>\u003Cimg src='http:\u002F\u002Fsrain-github.qiniudn.com\u002Fultra-ptr\u002Fcontains-all-of-views.gif' width=\"300px\" style='border: #f1f1f1 solid 1px'\u002F>\u003C\u002Fdiv>\n\n* Supports all of the refresh types.\n    * pull to refresh\n        \u003Cdiv>\u003Cimg src='http:\u002F\u002Fsrain-github.qiniudn.com\u002Fultra-ptr\u002Fpull-to-refresh.gif' width=\"300px\" style='border: #f1f1f1 solid 1px'\u002F>\u003C\u002Fdiv>\n    * release to refresh\n        \u003Cdiv>\u003Cimg src='http:\u002F\u002Fsrain-github.qiniudn.com\u002Fultra-ptr\u002Frelease-to-refresh.gif' width=\"300px\" style='border: #f1f1f1 solid 1px'\u002F>\u003C\u002Fdiv>\n\n    * keep header when refresh \n\n        \u003Cimg src='http:\u002F\u002Fsrain-github.qiniudn.com\u002Fultra-ptr\u002Fkeep-header.gif' width=\"300px\"\u002F>\n\n    * hide header when refresh\n\n        \u003Cimg src='http:\u002F\u002Fsrain-github.qiniudn.com\u002Fultra-ptr\u002Fhide-header.gif' width=\"300px\" sytle='border: #f1f1f1 solid 1px'\u002F>\n\n    * auto refresh\n\n        \u003Cimg src='http:\u002F\u002Fsrain-github.qiniudn.com\u002Fultra-ptr\u002Fauto-refresh.gif' width=\"300px\" sytle='border: #f1f1f1 solid 1px'\u002F>\u003C\u002Fdiv>\n\n# Usage\n\n#### Maven Central\n\nThis project has been pushed to Maven Central, both in `aar` and `apklib`.\n\nThe latest version: `1.0.11`, has been published to: https:\u002F\u002Foss.sonatype.org\u002Fcontent\u002Frepositories\u002Fsnapshots, in gradle:\n\n```\nmaven {\n    url 'https:\u002F\u002Foss.sonatype.org\u002Fcontent\u002Frepositories\u002Fsnapshots'\n}\n```\n\nThe stable version: `1.0.11`, https:\u002F\u002Foss.sonatype.org\u002Fcontent\u002Frepositories\u002Freleases, in gradle:\n\n```\nmavenCentral()\n```\n\npom.xml, latest version:\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>in.srain.cube\u003C\u002FgroupId>\n    \u003CartifactId>ultra-ptr\u003C\u002FartifactId>\n    \u003Ctype>aar\u003C\u002Ftype>\n    \u003C!-- or apklib format, if you want -->\n    \u003C!-- \u003Ctype>apklib\u003C\u002Ftype> -->\n    \u003Cversion>1.0.11\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\npom.xml, stable version:\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>in.srain.cube\u003C\u002FgroupId>\n    \u003CartifactId>ultra-ptr\u003C\u002FartifactId>\n    \u003Ctype>aar\u003C\u002Ftype>\n    \u003C!-- or apklib format, if you want -->\n    \u003C!-- \u003Ctype>apklib\u003C\u002Ftype> -->\n    \u003Cversion>1.0.11\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\ngradle, latest version:\n\n```\ncompile 'in.srain.cube:ultra-ptr:1.0.11'\n```\n\ngradle, stable version:\n\n```\ncompile 'in.srain.cube:ultra-ptr:1.0.11'\n```\n\n#### Config\n\nThere are 6 properties:\n\n* Resistence\n\n    This is the resistence while you are moving the frame, default is: `1.7f`.\n\n* Ratio of the Height of the Header to Refresh\n\n    The ratio of the height of the header to trigger refresh, default is: `1.2f`.\n\n* Duration to Close\n\n    The duration for moving from the position you relase the view to the height of header, default is `200ms`.\n\n* Duration to Close Header\n\n    The default value is `1000ms`\n\n* Keep Header while Refreshing\n\n    The default value is `true`.\n\n* Pull to Refresh \u002F Release to Refresh\n\n    The default value is Release to Refresh.\n\n##### Config in xml\n\n```xml\n\u003Cin.srain.cube.views.ptr.PtrFrameLayout\n    android:id=\"@+id\u002Fstore_house_ptr_frame\"\n    xmlns:cube_ptr=\"http:\u002F\u002Fschemas.android.com\u002Fapk\u002Fres-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n\n    cube_ptr:ptr_resistance=\"1.7\"\n    cube_ptr:ptr_ratio_of_header_height_to_refresh=\"1.2\"\n    cube_ptr:ptr_duration_to_close=\"300\"\n    cube_ptr:ptr_duration_to_close_header=\"2000\"\n    cube_ptr:ptr_keep_header_when_refresh=\"true\"\n    cube_ptr:ptr_pull_to_fresh=\"false\" >\n\n    \u003CLinearLayout\n        android:id=\"@+id\u002Fstore_house_ptr_image_content\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"@color\u002Fcube_mints_333333\"\n        android:clickable=\"true\"\n        android:padding=\"10dp\">\n\n        \u003Cin.srain.cube.image.CubeImageView\n            android:id=\"@+id\u002Fstore_house_ptr_image\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\" \u002F>\n    \u003C\u002FLinearLayout>\n\n\u003C\u002Fin.srain.cube.views.ptr.PtrFrameLayout>\n```\n\n### Or config in java code\n\n```java\n\u002F\u002F the following are default settings\nmPtrFrame.setResistance(1.7f);\nmPtrFrame.setRatioOfHeaderHeightToRefresh(1.2f);\nmPtrFrame.setDurationToClose(200);\nmPtrFrame.setDurationToCloseHeader(1000);\n\u002F\u002F default is false\nmPtrFrame.setPullToRefresh(false);\n\u002F\u002F default is true\nmPtrFrame.setKeepHeaderWhenRefresh(true);\n```\n\n### Other Config\n\n*  `setPinContent`. Pin the content, only the `HeaderView` will be moved. \n\n    This's the the performance of material style in support package v19.\n\n## StoreHouse Style\n\n* Config using string:\n\n```java\n\u002F\u002F header\nfinal StoreHouseHeader header = new StoreHouseHeader(getContext());\nheader.setPadding(0, LocalDisplay.dp2px(15), 0, 0);\n\n\u002F**\n * using a string, support: A-Z 0-9 - .\n * you can add more letters by {@link in.srain.cube.views.ptr.header.StoreHousePath#addChar}\n *\u002F\nheader.initWithString('Alibaba');\n```\n\n* Config using string array from xml:\n\n```java\nheader.initWithStringArray(R.array.storehouse);\n```\n\nAnd in `res\u002Fvalues\u002Farrays.xml`:\n\n```xml\n\u003Cresources>\n    \u003Cstring-array name=\"storehouse\">\n        \u003Citem>0,35,12,42,\u003C\u002Fitem>\n        \u003Citem>12,42,24,35,\u003C\u002Fitem>\n        \u003Citem>24,35,12,28,\u003C\u002Fitem>\n        \u003Citem>0,35,12,28,\u003C\u002Fitem>\n        \u003Citem>0,21,12,28,\u003C\u002Fitem>\n        \u003Citem>12,28,24,21,\u003C\u002Fitem>\n        \u003Citem>24,35,24,21,\u003C\u002Fitem>\n        \u003Citem>24,21,12,14,\u003C\u002Fitem>\n        \u003Citem>0,21,12,14,\u003C\u002Fitem>\n        \u003Citem>0,21,0,7,\u003C\u002Fitem>\n        \u003Citem>12,14,0,7,\u003C\u002Fitem>\n        \u003Citem>12,14,24,7,\u003C\u002Fitem>\n        \u003Citem>24,7,12,0,\u003C\u002Fitem>\n        \u003Citem>0,7,12,0,\u003C\u002Fitem>\n    \u003C\u002Fstring-array>\n\u003C\u002Fresources>\n```\n\n# Process Refresh\n\nThere is a `PtrHandler`, by which you can refresh the data.\n\n```\npublic interface PtrHandler {\n\n    \u002F**\n     * Check can do refresh or not. For example the content is empty or the first child is in view.\n     * \u003Cp\u002F>\n     * {@link in.srain.cube.views.ptr.PtrDefaultHandler#checkContentCanBePulledDown}\n     *\u002F\n    public boolean checkCanDoRefresh(final PtrFrameLayout frame, final View content, final View header);\n\n    \u002F**\n     * When refresh begin\n     *\n     * @param frame\n     *\u002F\n    public void onRefreshBegin(final PtrFrameLayout frame);\n}\n```\n\nAn example:\n\n```java\nptrFrame.setPtrHandler(new PtrHandler() {\n    @Override\n    public void onRefreshBegin(PtrFrameLayout frame) {\n        frame.postDelayed(new Runnable() {\n            @Override\n            public void run() {\n                ptrFrame.refreshComplete();\n            }\n        }, 1800);\n    }\n\n    @Override\n    public boolean checkCanDoRefresh(PtrFrameLayout frame, View content, View header) {\n        return PtrDefaultHandler.checkContentCanBePulledDown(frame, content, header);\n    }\n});\n```\n\n\n# Customize\n\nYou can add a `PtrUIHandler` to `PtrFrameLayout` to implement any UI effect you want.\n\n```java\npublic interface PtrUIHandler {\n\n    \u002F**\n     * When the content view has reached top and refresh has been completed, view will be reset.\n     *\n     * @param frame\n     *\u002F\n    public void onUIReset(PtrFrameLayout frame);\n\n    \u002F**\n     * prepare for loading\n     *\n     * @param frame\n     *\u002F\n    public void onUIRefreshPrepare(PtrFrameLayout frame);\n\n    \u002F**\n     * perform refreshing UI\n     *\u002F\n    public void onUIRefreshBegin(PtrFrameLayout frame);\n\n    \u002F**\n     * perform UI after refresh\n     *\u002F\n    public void onUIRefreshComplete(PtrFrameLayout frame);\n\n    public void onUIPositionChange(PtrFrameLayout frame, boolean isUnderTouch, byte status, int oldPosition, int currentPosition, float oldPercent, float currentPercent);\n}\n```\n\n# Q & A\n\n*  work with ViewPager: `disableWhenHorizontalMove()`\n\n*  work with LongPressed, `setInterceptEventWhileWorking()`\n\n# Contact & Help\n\nPlease fell free to contact me if there is any problem when using the library.\n\n* srain@php.net\n* twitter: https:\u002F\u002Ftwitter.com\u002Fliaohuqiu\n* weibo: http:\u002F\u002Fweibo.com\u002Fliaohuqiu\n* blog: http:\u002F\u002Fwww.liaohuqiu.net\n\n    1. About how to use cube-sdk \u002F Ultra Ptr: 271918140 (cube-sdk)\n\n        This the rule for our tribes, please read it before you request to join: https:\u002F\u002Fgithub.com\u002Fliaohuqiu\u002Fqq-tribe-rule\n\n    2. For those who like thinking independently and are good at solving problem independently. Please join us, we are all here on Slack: \n    \n        http:\u002F\u002Fjoin-add1bit.liaohuqiu.net\u002F\n","Ultra Pull to Refresh 是一个适用于 Android 的下拉刷新库，支持所有视图类型。它提供了比 SwipeRefreshLayout 更强大的功能和更好的自定义能力，用户可以轻松地为 ListView、GridView、ScrollView 甚至单个 TextView 添加下拉刷新效果。该项目支持多种刷新样式（如 StoreHouse 风格、Material 设计风格等），并且能够实现自动加载更多内容。其良好的设计允许开发者通过简单配置即可达到想要的 UI 效果。适用于需要在各种列表或滚动视图中添加刷新功能的应用场景，特别是那些追求良好用户体验和高度可定制性的应用程序。",2,"2026-06-11 02:58:35","top_language"]