{"id":21130167,"url":"https://github.com/felipecsl/QuickReturn","last_synced_at":"2025-07-09T01:32:36.712Z","repository":{"id":17721500,"uuid":"20548487","full_name":"felipecsl/QuickReturn","owner":"felipecsl","description":"Android ListView that implements the QuickReturn UI pattern. Written from scratch with focus on performance.","archived":false,"fork":false,"pushed_at":"2016-01-27T05:30:07.000Z","size":311,"stargazers_count":191,"open_issues_count":14,"forks_count":35,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-11-12T01:24:02.819Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://felipecsl.com/QuickReturn","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipecsl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-06T02:14:46.000Z","updated_at":"2023-07-05T07:35:36.000Z","dependencies_parsed_at":"2022-09-10T08:11:39.747Z","dependency_job_id":null,"html_url":"https://github.com/felipecsl/QuickReturn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecsl%2FQuickReturn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecsl%2FQuickReturn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecsl%2FQuickReturn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipecsl%2FQuickReturn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipecsl","download_url":"https://codeload.github.com/felipecsl/QuickReturn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476373,"owners_count":17480215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T05:32:20.694Z","updated_at":"2024-11-20T05:32:29.001Z","avatar_url":"https://github.com/felipecsl.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# QuickReturn\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-felipecsl%2FQuickReturn-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/697)\n\nAndroid ListView that implements the QuickReturn UI pattern. Written from scratch with focus on performance.\n\n### Demo\n\n[![video thumbnail](http://img.youtube.com/vi/BwLjMMIWNQU/hqdefault.jpg)](https://www.youtube.com/watch?v=BwLjMMIWNQU)\n\n### Usage\n\nIn your ``build.gradle`` file:\n\n```groovy\ndependencies {\n    // ...\n    compile 'com.felipecsl.quickreturn:library:1.5.1'\n}\n```\n\nIn your activity class:\n\n```java\nprivate ListView listView;\nprivate ArrayAdapter\u003cString\u003e adapter;\nprivate QuickReturnAttacher quickReturnAttacher;\nprivate TextView quickReturnTarget;\n\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n\n    setContentView(R.layout.activity_main);\n\n    // your listView :)\n    listView = (ListView) findViewById(R.id.listView);\n\n    // the quick return target view to be hidden/displayed\n    quickReturnTarget = (TextView) findViewById(R.id.quickReturnTarget);\n\n    // your inner adapter\n    adapter = new ArrayAdapter\u003c\u003e(this, android.R.layout.simple_list_item_1);\n\n    // Wrap your adapter with QuickReturnAdapter\n    listView.setAdapter(new QuickReturnAdapter(adapter));\n\n    // Attach a QuickReturnAttacher, which takes care of all of the hide/show functionality.\n    quickReturnAttacher = QuickReturnAttacher.forView(listView);\n\n    // Add a quick return targetView to the attacher.\n    // You can pass a position argument (POSITION_TOP or POSITION_BOTTOM).\n    // You can also optionally pass the size of the target view, which will be used to \n    // offset the list height, preventing it from hiding content behind the target view.\n    quickReturnAttacher.addTargetView(quickReturnTarget, QuickReturnTargetView.POSITION_TOP, 50);\n\n    // If you need to add an OnScrollListener to the listView, this is the correct\n    // way to do so.\n    // You have to add it on the QuickReturnAttacher instead\n    // of adding on the listView directly.\n    quickReturnAttacher.addOnScrollListener(this);\n}\n```\n\nCheck the [sample app](https://github.com/felipecsl/QuickReturn/blob/master/app/src/main/java/com/felipecsl/quickreturn/app/MainActivity.java) for an example of usage.\n\n### Features\n\n* Supports dynamic adapters. That means you can add and remove items from your adapter and it will still work nicely.\n* You don't have to subclass ``QuickReturnAdapter`` in order to use it. Just pass your own adapter to the constructor and you're done.\n* Animated transitions via ``QuickReturnAttacher.setAnimatedTransition(true)``\n* Supports bottom (footer) quick return position via ``QuickReturnAttacher.setPosition(QuickReturnListView.POSITION_BOTTOM).``\n* You can use it with any subclass of ``AbsListView``, including ``ListView`` and ``GridView``.\n* If you're using a ``GridView``, you have to tell ``QuickReturnAdapter`` how many columns it has, via its constructor:\n* Automatically adjusts the ListView/GridView to prevent it from being hidden behind the target view, when it is placed at the top of the list.\n* Supports ScrollView as well!\n\n```java\npublic QuickReturnAdapter(final ListAdapter wrappedAdapter, final int numColumns)\n```\n\n\nWorks with API Level 10 and above.\n\n### Known issues/Caveats\n\n* The Animated Transition will sometimes hide/show randomly when scrolling down very slowly.\n\n### Changelog\n\nPlease see the [Changelog](https://github.com/felipecsl/QuickReturn/blob/master/CHANGELOG.md) to check what's recently changed.\n\n### Credits\n\nHeavily inspired/influenced by the [nice work of Roman Nurik's and Nick Butcher's](https://plus.google.com/+RomanNurik/posts/1Sb549FvpJt) and Lars Werkman's [QuickReturnListView](https://github.com/LarsWerkman/QuickReturnListView)\n\n### Contributing\n\n* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet\n* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it\n* Fork the project\n* Start a feature/bugfix branch\n* Commit and push until you are happy with your contribution\n* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.\n\n### Copyright and license\n\nCode and documentation copyright 2011-2014 Felipe Lima.\nCode released under the [MIT license](https://github.com/felipecsl/QuickReturn/blob/master/LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipecsl%2FQuickReturn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipecsl%2FQuickReturn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipecsl%2FQuickReturn/lists"}