{"id":3501,"url":"https://github.com/NoNews/NoPaginate","last_synced_at":"2025-08-03T20:32:30.887Z","repository":{"id":88836614,"uuid":"100255414","full_name":"NoNews/NoPaginate","owner":"NoNews","description":"Android pagination library (updated 01.05.2018)","archived":false,"fork":false,"pushed_at":"2022-01-12T15:16:41.000Z","size":204,"stargazers_count":183,"open_issues_count":5,"forks_count":31,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-16T14:34:42.250Z","etag":null,"topics":["android","android-library","pagination","recyclerview","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NoNews.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-08-14T10:22:08.000Z","updated_at":"2023-06-06T07:48:55.000Z","dependencies_parsed_at":"2023-06-12T20:15:16.777Z","dependency_job_id":null,"html_url":"https://github.com/NoNews/NoPaginate","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoNews%2FNoPaginate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoNews%2FNoPaginate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoNews%2FNoPaginate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoNews%2FNoPaginate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NoNews","download_url":"https://codeload.github.com/NoNews/NoPaginate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228567009,"owners_count":17937983,"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":["android","android-library","pagination","recyclerview","wrapper"],"created_at":"2024-01-05T20:16:43.319Z","updated_at":"2024-12-07T05:30:32.583Z","avatar_url":"https://github.com/NoNews.png","language":"Java","funding_links":[],"categories":["Libraries"],"sub_categories":["GUI"],"readme":"# NoPaginate\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-NoPaginate-blue.svg?style=flat)](https://android-arsenal.com/details/1/6300)\n[![androidweekly.cn](https://img.shields.io/badge/androidweekly.cn-%23156-red.svg)](http://androidweekly.cn/android-dev-weekly-issue-156/)\n [ ![Download](https://api.bintray.com/packages/nonews/maven/nopaginate/images/download.svg) ](https://bintray.com/nonews/maven/nopaginate/_latestVersion)\n [![API](https://img.shields.io/badge/API-15%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=null)\n\nDeprecated. \n\nAndroid pagination library, based on [@MarkoMilos](https://github.com/MarkoMilos) repository [Paginate](https://github.com/MarkoMilos/Paginate)\n\n\n\n\n\nLoading Item           |  Error Item\n:-------------------------:|:-------------------------:\n![](https://github.com/NoNews/NoPaginate/blob/master/art/loading.jpg \"Loading item\")  | ![](https://github.com/NoNews/NoPaginate/blob/master/art/error.jpg \"Error item\")\n\n\n\n### Gradle\n\n```\nimplementation 'ru.alexbykov:nopaginate:0.9.9'\n```\n\n### Install\n```java\n  NoPaginate noPaginate = NoPaginate.with(recyclerView)\n                .setOnLoadMoreListener(new OnLoadMoreListener() {\n                    @Override\n                    public void onLoadMore() {\n                        //http or db request\n                    }\n                })\n                .build();\n```\n\n\n\nIf you use ```MVP``` or ```Clean Architecture```, don't forget implement ```PaginateView```.\nYou can see example of implementation with MVP [here](https://github.com/NoNews/NoPaginate/tree/master/sample/src/main/java/ru/alexbykov/pagination)\n\n### Actions\n```java\n   noPaginate.showLoading(show);\n   noPaginate.showError(show);\n   noPaginate.setNoMoreItems(set); //Method onLoadMore will not to call\n   noPaginate.unbind(); //Don't forget call it on onDestroy();\n```\n\n### Custom Loading and Error\nFor custom error and loaging item just implement the interfaces ```ErrorItem``` or ```LoadingItem```\n\n#### Custom error:\n```java\npublic class CustomErrorItem implements ErrorItem {\n\n           @Override\n           public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n               View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_error, parent, false);\n               return new RecyclerView.ViewHolder(view) {\n               };\n           }\n\n           @Override\n           public void onBindViewHolder(RecyclerView.ViewHolder holder, int position, final OnRepeatListener repeatListener) {\n               Button btnRepeat = (Button) holder.itemView.findViewById(R.id.btnRepeat);\n               btnRepeat.setOnClickListener(new View.OnClickListener() {\n                   @Override\n                   public void onClick(View v) {\n                       if (repeatListener != null) {\n                           repeatListener.onClickRepeat(); //call onLoadMore\n                       }\n                   }\n               });\n           }\n}\n```\n\n\n#### Custom loading:\n```java\npublic class CustomLoadingItem implements LoadingItem {\n   \n        @Override\n        public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n            View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_loading, parent, false);\n            return new RecyclerView.ViewHolder(view) {\n            };\n        }\n        @Override\n        public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {\n   \n        }\n   \n}\n```\n\n#### Install with custom items and trigger threshold\n\n```java\n\n  NoPaginate noPaginate = NoPaginate.with(recyclerView)\n                .setOnLoadMoreListener(new OnLoadMoreListener() {\n                    @Override\n                    public void onLoadMore() {\n                        //http or db request\n                    }\n                })\n                .setLoadingTriggerThreshold(5) //0 by default\n                .setCustomErrorItem(new CustomErrorItem())\n                .setCustomLoadingItem(new CustomLoadingItem())\n                .build();\n```\n\n\n#### Idea\nThis repository is a slightly modified version of [Paginate](https://github.com/MarkoMilos/Paginate) library.\nAuthor: [@MarkoMilos](https://github.com/MarkoMilos)\n\nWe decided to modify it a little, so that developers could easily use it with MVP or Clean Architecture\n\n\n#### Roadmap\n1. Double-sided pagination\n2. Delegate for ```Presenter``` or ```Interactor```, with implementation Limit/Offset and Page pagination\n3. Unit tests\n4. Wiki\n\n#### Contributing\n\nIf you find any bug, or you have suggestions, don't be shy to create [issues](https://github.com/NoNews/NoPaginate/issues) or make a [PRs](https://github.com/NoNews/NoPaginate/pulls) in the `develop` branch.\nYou can read contribution guidelines [here](https://github.com/NoNews/NoPaginate/blob/master/CONTRIBUTING.md)\n\n#### My other libraries:\n1. [NoPermission](https://github.com/NoNews/NoPermission) — Simple Android permission library, consist of only one class\n1. [NoRecyclerViewAdapter](https://github.com/NoNews/NoRecyclerViewAdapter) — Simple base adapter for recyclerView\n### License\n```\nCopyright 2017 Alex Bykov\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNoNews%2FNoPaginate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNoNews%2FNoPaginate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNoNews%2FNoPaginate/lists"}