{"id":21130206,"url":"https://github.com/liangfeidotme/AndroidScreenSlidePager","last_synced_at":"2025-07-09T01:32:45.654Z","repository":{"id":29383221,"uuid":"32918188","full_name":"liangfeidotme/AndroidScreenSlidePager","owner":"liangfeidotme","description":"Pager (especially for ViewPager) indicator in two styles: circle \u0026 fraction.","archived":true,"fork":false,"pushed_at":"2020-04-10T05:28:55.000Z","size":9762,"stargazers_count":207,"open_issues_count":3,"forks_count":72,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-07-29T05:21:03.869Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://liangfei.me","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/liangfeidotme.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-03-26T09:26:53.000Z","updated_at":"2024-03-26T11:12:09.000Z","dependencies_parsed_at":"2022-09-06T16:51:20.152Z","dependency_job_id":null,"html_url":"https://github.com/liangfeidotme/AndroidScreenSlidePager","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/liangfeidotme%2FAndroidScreenSlidePager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangfeidotme%2FAndroidScreenSlidePager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangfeidotme%2FAndroidScreenSlidePager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangfeidotme%2FAndroidScreenSlidePager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liangfeidotme","download_url":"https://codeload.github.com/liangfeidotme/AndroidScreenSlidePager/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:24.476Z","updated_at":"2024-11-20T05:32:33.204Z","avatar_url":"https://github.com/liangfeidotme.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# PagerIndicator\n[ ![Download](https://api.bintray.com/packages/lyndonchin/maven/pagerindicator/images/download.svg?version=0.0.2) ](https://bintray.com/lyndonchin/maven/pagerindicator/0.0.2/link)\n\nPager (especially for ViewPager) indicator in two styles: circle \u0026 fraction.\n\n## Demo\n\ncircle | fraction\n--- | ---\n\u003cimg src=\"art/art_circular.jpeg\" width=\"300px\"\u003e | \u003cimg src=\"art/art_numberic.jpeg\" width=\"300px\"\u003e\n\n## Dependency\n\n```groovy\nimplementation 'me.liangfei:pagerindicator:0.0.2'\n```\n\n## Usage\n\nTwo attributes are provided:\n* `app:indicator_type` = [fraction | circle].\n* `app:indicator_spacing` works only for the circle type indicator.\n\n**Step 1: add `PageIndicator` to the bottom of the ViewPager.**\n\n```xml\n\u003cmerge xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\u003e\n\n    \u003candroidx.viewpager.widget.ViewPager\n        android:id=\"@+id/pager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" /\u003e\n\n    \u003cme.liangfei.indicator.PagerIndicator\n        android:id=\"@+id/indicator\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_marginBottom=\"20dp\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginStart=\"20dp\"\n        android:gravity=\"bottom|center_horizontal\"\n        app:indicator_spacing=\"5dp\"\n        app:indicator_type=\"fraction\" /\u003e\n\u003c/merge\u003e\n```\n\n**Step 2: pass the ViewPager instance to the PagerIndicator instance.**\n\n```kotlin\nval pageIndicator = findViewById(R.id.indicator);\npageIndicator.setViewPager(pager);\n```\n\nYou can just take `PageIndicator` as a normal view to make your layout, because it extends `LinearLayout`.\n\nCheck the [app](app) module for more details.\n\n## dependencies\n* [Fresco](https://github.com/facebook/fresco)\n\n## 欢迎关注我的微信公众号（Chinese only）\n\u003cimg width=\"300px\" src=\"https://cdn.nlark.com/yuque/0/2019/png/124977/1552294534293-9ae5a46a-df3c-4020-8096-a05534f53a0b.png\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangfeidotme%2FAndroidScreenSlidePager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliangfeidotme%2FAndroidScreenSlidePager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangfeidotme%2FAndroidScreenSlidePager/lists"}