{"id":3507,"url":"https://github.com/JakeWharton/ViewPagerIndicator","last_synced_at":"2025-08-12T01:31:05.837Z","repository":{"id":1600334,"uuid":"2155793","full_name":"JakeWharton/ViewPagerIndicator","owner":"JakeWharton","description":"Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock.","archived":true,"fork":false,"pushed_at":"2017-11-26T17:13:46.000Z","size":8657,"stargazers_count":10145,"open_issues_count":210,"forks_count":4021,"subscribers_count":683,"default_branch":"master","last_synced_at":"2024-04-14T00:47:21.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://viewpagerindicator.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"balderdashy/sails.io.js","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JakeWharton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-04T17:13:44.000Z","updated_at":"2024-04-04T03:09:33.000Z","dependencies_parsed_at":"2022-07-20T03:32:41.558Z","dependency_job_id":null,"html_url":"https://github.com/JakeWharton/ViewPagerIndicator","commit_stats":null,"previous_names":["jakewharton/android-viewpagerindicator"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2FViewPagerIndicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2FViewPagerIndicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2FViewPagerIndicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2FViewPagerIndicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakeWharton","download_url":"https://codeload.github.com/JakeWharton/ViewPagerIndicator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229352445,"owners_count":18059491,"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-01-05T20:16:43.492Z","updated_at":"2024-12-13T22:30:39.955Z","avatar_url":"https://github.com/JakeWharton.png","language":"Java","readme":"Android ViewPagerIndicator\n==========================\n\nPaging indicator widgets that are compatible with the `ViewPager` from the\n[Android Support Library][2] to improve discoverability of content.\n\nTry out the sample application [on the Android Market][10].\n\n![ViewPagerIndicator Sample Screenshots][9]\n\nThese widgets can also be used in conjunction with [ActionBarSherlock][3]!\n\n\n\nUsage\n=====\n\n*For a working implementation of this project see the `sample/` folder.*\n\n  1. Include one of the widgets in your view. This should usually be placed\n     adjacent to the `ViewPager` it represents.\n\n        \u003ccom.viewpagerindicator.TitlePageIndicator\n            android:id=\"@+id/titles\"\n            android:layout_height=\"wrap_content\"\n            android:layout_width=\"fill_parent\" /\u003e\n\n  2. In your `onCreate` method (or `onCreateView` for a fragment), bind the\n     indicator to the `ViewPager`.\n\n         //Set the pager with an adapter\n         ViewPager pager = (ViewPager)findViewById(R.id.pager);\n         pager.setAdapter(new TestAdapter(getSupportFragmentManager()));\n\n         //Bind the title indicator to the adapter\n         TitlePageIndicator titleIndicator = (TitlePageIndicator)findViewById(R.id.titles);\n         titleIndicator.setViewPager(pager);\n\n  3. *(Optional)* If you use an `OnPageChangeListener` with your view pager\n     you should set it in the indicator rather than on the pager directly.\n\n         //continued from above\n         titleIndicator.setOnPageChangeListener(mPageChangeListener);\n\n\nTheming\n-------\n\nThere are three ways to style the look of the indicators.\n\n 1. **Theme XML**. An attribute for each type of indicator is provided in which\n    you can specify a custom style.\n 2. **Layout XML**. Through the use of a custom namespace you can include any\n    desired styles.\n 3. **Object methods**. Both styles have getters and setters for each style\n    attribute which can be changed at any point.\n\nEach indicator has a demo which creates the same look using each of these\nmethods.\n\n\nIncluding In Your Project\n-------------------------\n\nAndroid-ViewPagerIndicator is presented as an [Android library project][7]. A\nstandalone JAR is not possible due to the theming capabilities offered by the\nindicator widgets.\n\nYou can include this project by [referencing it as a library project][8] in\nEclipse or ant.\n\nIf you are a Maven user you can easily include the library by specifying it as\na dependency:\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.viewpagerindicator\u003c/groupId\u003e\n      \u003cartifactId\u003elibrary\u003c/artifactId\u003e\n      \u003cversion\u003e2.4.1\u003c/version\u003e\n      \u003ctype\u003eapklib\u003c/type\u003e\n    \u003c/dependency\u003e\n\nThis project depends on the `ViewPager` class which is available in the\n[Android Support Library][2] or [ActionBarSherlock][3]. Details for\nincluding one of those libraries is available on their respecitve web sites.\n\n\n\n\nDeveloped By\n============\n\n * Jake Wharton - \u003cjakewharton@gmail.com\u003e\n\n\nCredits\n-------\n\n * [Patrik Åkerfeldt][1] - Author of [ViewFlow][4], a precursor to the ViewPager,\n   which supports paged views and is the original source of both the title\n   and circle indicators.\n * [Francisco Figueiredo Jr.][5] - Idea and [first implementation][6] for\n   fragment support via ViewPager.\n\n\n\n\nLicense\n=======\n\n    Copyright 2012 Jake Wharton\n    Copyright 2011 Patrik Åkerfeldt\n    Copyright 2011 Francisco Figueiredo Jr.\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\n\n\n\n\n [1]: https://github.com/pakerfeldt\n [2]: http://developer.android.com/sdk/compatibility-library.html\n [3]: http://actionbarsherlock.com\n [4]: https://github.com/pakerfeldt/android-viewflow\n [5]: https://github.com/franciscojunior\n [6]: https://gist.github.com/1122947\n [7]: http://developer.android.com/guide/developing/projects/projects-eclipse.html\n [8]: http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject\n [9]: https://raw.github.com/JakeWharton/Android-ViewPagerIndicator/master/sample/screens.png\n [10]: https://play.google.com/store/apps/details?id=com.viewpagerindicator.sample\n","funding_links":[],"categories":["Java","Libraries","Index `(light-weight pages)`","CN","Index","etc","Android 开发中的日常积累","库"],"sub_categories":["GUI","[Jake Wharton](https://github.com/JakeWharton)","安卓开发值得关注的库","[](https://github.com/JStumpp/awesome-android/blob/master/readme.md#navigation)导航"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJakeWharton%2FViewPagerIndicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJakeWharton%2FViewPagerIndicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJakeWharton%2FViewPagerIndicator/lists"}