Android ViewPagerIndicator
==========================
Paging indicator widgets that are compatible with the `ViewPager` from the
[Android Support Library][2] to improve discoverability of content.
Try out the sample application [on the Android Market][10].
![ViewPagerIndicator Sample Screenshots][9]
These widgets can also be used in conjunction with [ActionBarSherlock][3]!
Usage
=====
*For a working implementation of this project see the `sample/` folder.*
1. Include one of the widgets in your view. This should usually be placed
adjacent to the `ViewPager` it represents.
<com.viewpagerindicator.TitlePageIndicator
android:id="@+id/titles"
android:layout_height="wrap_content"
android:layout_width="fill_parent" />
2. In your `onCreate` method (or `onCreateView` for a fragment), bind the
indicator to the `ViewPager`.
//Set the pager with an adapter
ViewPager pager = (ViewPager)findViewById(R.id.pager);
pager.setAdapter(new TestAdapter(getSupportFragmentManager()));
//Bind the title indicator to the adapter
TitlePageIndicator titleIndicator = (TitlePageIndicator)findViewById(R.id.titles);
titleIndicator.setViewPager(pager);
3. *(Optional)* If you use an `OnPageChangeListener` with your view pager
you should set it in the indicator rather than on the pager directly.
//continued from above
titleIndicator.setOnPageChangeListener(mPageChangeListener);
Theming
-------
There are three ways to style the look of the indicators.
1. **Theme XML**. An attribute for each type of indicator is provided in which
you can specify a custom style.
2. **Layout XML**. Through the use of a custom namespace you can include any
desired styles.
3. **Object methods**. Both styles have getters and setters for each style
attribute which can be changed at any point.
Each indicator has a demo which creates the same look using each of these
methods.
Including In Your Project
-------------------------
Android-ViewPagerIndicator is presented as an [Android library project][7]. A
standalone JAR is not possible due to the theming capabilities offered by the
indicator widgets.
You can include this project by [referencing it as a library project][8] in
Eclipse or ant.
If you are a Maven user you can easily include the library by specifying it as
a dependency:
<dependency>
<groupId>com.viewpagerindicator</groupId>
<artifactId>library</artifactId>
<version>2.4.1</version>
<type>apklib</type>
</dependency>
This project depends on the `ViewPager` class which is available in the
[Android Support Library][2] or [ActionBarSherlock][3]. Details for
including one of those libraries is available on their respecitve web sites.
Developed By
============
* Jake Wharton - <jakewharton@gmail.com>
Credits
-------
* [Patrik Åkerfeldt][1] - Author of [ViewFlow][4], a precursor to the ViewPager,
which supports paged views and is the original source of both the title
and circle indicators.
* [Francisco Figueiredo Jr.][5] - Idea and [first implementation][6] for
fragment support via ViewPager.
License
=======
Copyright 2012 Jake Wharton
Copyright 2011 Patrik Åkerfeldt
Copyright 2011 Francisco Figueiredo Jr.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
[1]: https://github.com/pakerfeldt
[2]: http://developer.android.com/sdk/compatibility-library.html
[3]: http://actionbarsherlock.com
[4]: https://github.com/pakerfeldt/android-viewflow
[5]: https://github.com/franciscojunior
[6]: https://gist.github.com/1122947
[7]: http://developer.android.com/guide/developing/projects/projects-eclipse.html
[8]: http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject
[9]: https://raw.github.com/JakeWharton/Android-ViewPagerIndicator/master/sample/screens.png
[10]: https://play.google.com/store/apps/details?id=com.viewpagerindicator.sample
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
开源中国Android客户端源码 (1975个子文件)
INoticeService.aidl 153B
RemoteSSO.aidl 101B
.classpath 612B
.classpath 466B
.classpath 466B
.classpath 466B
.classpath 466B
shCore.css 6KB
shThemeDefault.css 2KB
Thumbs.db 16KB
.factorypath 272B
.gitignore 289B
.gitignore 190B
.gitignore 36B
Gradle化说明 357B
zxing.jar 977KB
baidumapapi_v3_2_0.jar 820KB
android-support-v4.jar 741KB
android-support-v4.jar 741KB
android-support-v4.jar 741KB
android-support-v4.jar 741KB
android-support-v4.jar 741KB
xstream-1.4.7.jar 519KB
nbs.newlens.agent.jar 512KB
SocialSDK_QQZone_2.jar 402KB
umeng_social_sdk.jar 365KB
android-support-v7-appcompat.jar 343KB
KJFrameForAndroid_v2.223.jar 236KB
library-2.4.0.jar 108KB
SocialSDK_tencentWB_2.jar 103KB
locSDK_3.1.jar 97KB
android-async-http-1.4.6.jar 93KB
SocialSDK_QQZone_1.jar 63KB
SocialSDK_tencentWB_1.jar 50KB
SocialSDK_WeiXin_1.jar 46KB
SocialSDK_QQZone_3.jar 45KB
butterknife-5.1.2.jar 45KB
SocialSDK_WeiXin_2.jar 28KB
httpmime-4.1.3.jar 26KB
SocialSDK_Sina.jar 6KB
SocialSDK_tencentWB_3.jar 4KB
UIHelper.java 39KB
PhotoViewAttacher.java 35KB
DisplayRules.java 33KB
DiskLruCache.java 33KB
OSChinaApi.java 33KB
TitlePageIndicator.java 31KB
TweetPubFragment.java 24KB
BaseDetailFragment.java 24KB
ImageUtils.java 23KB
KJDragGridView.java 23KB
TeamNewActiveActivity.java 22KB
TeamIssueDetailFragment.java 22KB
TDevice.java 21KB
UserCenterFragment.java 19KB
TweetDetailFragment.java 19KB
CaptureActivity.java 18KB
CirclePageIndicator.java 18KB
BaseListFragment.java 18KB
DatePickerDialog.java 17KB
Spring.java 16KB
TeamNewIssueFragment.java 16KB
BrowserFragment.java 16KB
LinePageIndicator.java 15KB
SpringConfiguratorView.java 15KB
PagerSlidingTabStrip.java 14KB
MyInformationFragmentDetail.java 14KB
MyInformationFragment.java 14KB
OSChinaTeamApi.java 14KB
TeamTweetDetailFragment.java 14KB
MainActivity.java 13KB
BadgeView.java 13KB
EventDetailFragment.java 13KB
FileUtil.java 13KB
UnderlinePageIndicator.java 13KB
SimpleMonthView.java 13KB
StringUtils.java 13KB
CommentFrament.java 12KB
NoteBookFragment.java 12KB
TeamDiaryDetail.java 12KB
RecordButton.java 12KB
MessageDetailFragment.java 12KB
TeamIssue.java 12KB
NoticeService.java 11KB
TweetAdapter.java 11KB
IPhotoView.java 11KB
TeamMainActivity.java 10KB
AppContext.java 10KB
CommonDialog.java 10KB
Tweet.java 10KB
ServerTaskService.java 10KB
SoftwareCatalogListFragment.java 10KB
ZipUtils.java 10KB
MyURLSpan.java 10KB
LoginActivity.java 9KB
TweetsFragment.java 9KB
NoticeViewPagerFragment.java 9KB
TabPageIndicator.java 9KB
DayPickerView.java 9KB
NoteEditFragment.java 9KB
共 1975 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- Wwh.AndOS2016-04-12不是最新版本,不过还是很有学习的价值
- HelloWord32015-10-13可以使用,不过不是最新版本
Rander.C
- 粉丝: 40
- 资源: 25
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- CFA知识点梳理系列:CFA Level II, Reading 4 Big Data Projects
- 专业问题 · 语雀.mhtml
- 基于Vue+TP6的B2B2C多场景电商商城设计源码
- 基于小程序的研知识题库小程序源代码(java+小程序+mysql).zip
- 基于小程序的微信小程序的点餐系统源代码(java+小程序+mysql).zip
- 基于小程序的宿舍管理小程序源代码(java+小程序+mysql).zip
- 基于小程序的小区服务系统源代码(python+小程序+mysql).zip
- QT项目之中国象棋人工智能
- 基于小程序的疫情核酸预约小程序源代码(java+小程序+mysql).zip
- 基于小程序的生活小助手源代码(java+小程序+mysql).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功