{"id":20367952,"url":"https://github.com/ksoichiro/android-pagecontrol","last_synced_at":"2025-04-12T05:36:51.291Z","repository":{"id":21116260,"uuid":"24416907","full_name":"ksoichiro/Android-PageControl","owner":"ksoichiro","description":"Clickable PageControl for Android apps.","archived":false,"fork":false,"pushed_at":"2015-05-01T02:35:26.000Z","size":451,"stargazers_count":25,"open_issues_count":3,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T01:02:48.710Z","etag":null,"topics":["android","android-library","android-ui"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/ksoichiro.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":"2014-09-24T13:52:26.000Z","updated_at":"2021-09-29T10:17:20.000Z","dependencies_parsed_at":"2022-07-27T01:47:07.736Z","dependency_job_id":null,"html_url":"https://github.com/ksoichiro/Android-PageControl","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/ksoichiro%2FAndroid-PageControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksoichiro%2FAndroid-PageControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksoichiro%2FAndroid-PageControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksoichiro%2FAndroid-PageControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksoichiro","download_url":"https://codeload.github.com/ksoichiro/Android-PageControl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248524855,"owners_count":21118616,"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","android-ui"],"created_at":"2024-11-15T00:35:47.393Z","updated_at":"2025-04-12T05:36:51.238Z","avatar_url":"https://github.com/ksoichiro.png","language":"Kotlin","readme":"# Android-PageControl\n\n[![Build Status](https://travis-ci.org/ksoichiro/Android-PageControl.svg?branch=master)](https://travis-ci.org/ksoichiro/Android-PageControl)\n[![Maven Central](http://img.shields.io/maven-central/v/com.github.ksoichiro/androidpagecontrol.svg)](https://github.com/ksoichiro/Android-PageControl/releases/latest)\n\n![](demo.gif)\n\nClickable PageControl for Android apps.  \nThere are some great libraries like `ViewPagerIndicator` but they don't handle taps on indicator like `PageControl` on iOS.  \nThis widget handles taps just as `PageControl` does.\n\n## Usage\n\n### build.gradle\n\nAvailable in the Maven Central Repository.  \nIt depends on `support-v4` library.\n\n```groovy\ndependencies {\n    compile 'com.android.support:support-v4:20.0.0'\n    compile 'com.github.ksoichiro:androidpagecontrol:0.1.1'\n}\n```\n\n### Add to layout XML\n\n```xml\n    \u003ccom.androidpagecontrol.PageControl\n        android:id=\"@+id/page_control\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\" /\u003e\n\n    \u003candroid.support.v4.view.ViewPager\n        android:id=\"@+id/pager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_above=\"@id/page_control\"\n        android:layout_alignParentTop=\"true\" /\u003e\n```\n\n### Add Java codes\n\n```java\nSamplePagerAdapter adapter = new SamplePagerAdapter(this);\nViewPager viewPager = (ViewPager) findViewById(R.id.pager);\nviewPager.setAdapter(adapter);\n\nfinal PageControl pageControl = (PageControl) findViewById(R.id.page_control);\npageControl.setViewPager(viewPager);\npageControl.setPosition(1);\n```\n\n### Styling\n\n```xml\n    \u003cstyle name=\"AppTheme\" parent=\"AppBaseTheme\"\u003e\n        \u003citem name=\"apcStyles\"\u003e@style/AppPageControlStyle\u003c/item\u003e\n    \u003c/style\u003e\n\n    \u003cstyle name=\"AppPageControlStyle\"\u003e\n        \u003c!-- To change indicator size --\u003e\n        \u003citem name=\"apc_indicatorSize\"\u003e8dp\u003c/item\u003e\n        \u003c!-- To change distance between indicators --\u003e\n        \u003citem name=\"apc_indicatorDistance\"\u003e8dp\u003c/item\u003e\n        \u003c!-- To change current item indicator size --\u003e\n        \u003citem name=\"apc_currentIndicatorSize\"\u003e10dp\u003c/item\u003e\n        \u003c!-- To change indicator colors --\u003e\n        \u003citem name=\"apc_colorCurrentDefault\"\u003e#1de9b6\u003c/item\u003e\n        \u003citem name=\"apc_colorCurrentPressed\"\u003e#a7ffeb\u003c/item\u003e\n        \u003citem name=\"apc_colorNormalDefault\"\u003e#009688\u003c/item\u003e\n        \u003citem name=\"apc_colorNormalPressed\"\u003e#4db6ac\u003c/item\u003e\n    \u003c/style\u003e\n```\n\n### Controlling enable/clickable\n\n`PageControl`'s `setEnable(boolean)` and `setClickable(boolean)` methods affect to its children(indicators).\nSo if you want to disable taps for indicators, you don't have to access each indicator views.\n\n## Developed By\n\n* Soichiro Kashima - \u003csoichiro.kashima@gmail.com\u003e\n\n## License\n\n    Copyright 2014 Soichiro Kashima\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n[Publishing script](kotlin-publish.gradle) is based on [chrisbanes/gradle-mvn-push](https://github.com/chrisbanes/gradle-mvn-push).\n\n    Copyright 2013 Chris Banes\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksoichiro%2Fandroid-pagecontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksoichiro%2Fandroid-pagecontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksoichiro%2Fandroid-pagecontrol/lists"}