ViewPagerIndicator
来源:互联网 发布:淘宝中的电子商务 编辑:程序博客网 时间:2024/05/16 00:32
http://viewpagerindicator.com/
Introduction
Paging indicator widgets compatible with the ViewPager
from the Android Support Library and ActionBarSherlock. Originally based onPatrik Åkerfeldt's ViewFlow.
When using the ViewPager
widget it is not always obvious to the user that there are adjacent views they can navigate to. By implementing this widget you provide a clear indicator that there exists additional content which they can click or swipe to see.
At present there are five styles of indicators which can be used:
Title Indicator
Displays the title of the selected page in the center with the titles of the adjacent pages (if available) in a more subtle style.
Tab Indicator
Similar to the title indicator but displays as many titles as possible in scrolling and animated horizontal tabs.
Circle Indicator
Simple indication of the number of pages available in the pager with a separate drawing style for the currently selected page.
Line Indicator
Similar to the circle indicator but draws a very subtle line for each page with a separate drawing style for the current page.
Underline Indicator
Mimics the indicator on the Ice Cream Sandwich application launcher with a fading line the moves with each page.
Download
Version 2.3.1 — 2012-05-19
Download ZIPDownload TGZ
Change Log
- New
LinePageIndicator
! Draws small indicators lines much like the circle indicator but much more subtle. - New
UnderlinePageIndicator
! Acts like the indicator on the Ice Cream Sandwich application launcher. - Circle indicator now uses
android:orientation
rather than custom attribute. - Title indicator adapter callback now uses the standard
getPageTitle(int)
method introduced in the r6 version of the support library. - Title indicator now uses
android:textSize
andandroid:textColor
in its styles. - Fix: Do not create objects in drawing, layout, or measurement steps of each indicator.
- Fix: Improve offset detection when page margins are in use on the pager.
- Maven: The dependency on the support library is now using an artifact from central rather than requiring you to deploy your own locally
Looking for an older version? Check here.
Try out the sample application:
Usage
- Include one of the widgets in your view. This should usually be placed adjacent to the
ViewPager
it represents.<com.viewpagerindicator.TitlePageIndicatorandroid:id="@+id/titles"android:layout_height="wrap_content"android:layout_width="fill_parent" />
- In your
onCreate
method (oronCreateView
for a fragment), bind the indicator to theViewPager
.//Set the pager with an adapterViewPager pager = (ViewPager)findViewById(R.id.pager);pager.setAdapter(new TestAdapter(getSupportFragmentManager()));//Bind the title indicator to the adapterTitlePageIndicator titleIndicator = (TitlePageIndicator)findViewById(R.id.titles);titleIndicator.setViewPager(pager);
- (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 abovetitleIndicator.setOnPageChangeListener(mPageChangeListener);
For more examples please take a look at the source code to the samples.
Implementations
Beautiful Widgets
Beautiful set of Widgets containing clock widget, clock and weather widget, weather widgets, date widgets and toggle widgets with skins/themes support! Now with more widgets and layouts!
FriendCaster
FriendCaster for Facebook gives you the best Facebook experience on Android devices!
SeriesGuide
Manage the progress of (re-)watching your favorite TV shows. Keep track of which episodes you still have to watch or which ones are upcoming.
Ride Metra
Ride Metra is an easy to use and beautiful transit app that provides Metra train schedules, station locations and directions, nearby stations, upcoming departures, Metra service advisory alerts and the ability to search for a Metra rail line or station.
Traktoid
Traktoid, a trakt client.
RateBeer for Android
Mobile interface to the world's largest source for information on craft beer: RateBeer.
Astronomy Picture of the Day
Get the latest pictures from NASA's Astronomy Picture of the Day (APOD) and set them as your homescreen wallpaper.
Notification Agenda
Simple application which turns small notes into pleasing status bar notifications with fancy high quality icons. All your notes are easily accessible so you never forget all those important appointments ever again.
BGSU News
Simplistic application that allows the user to view the most recent (university-approved) going-ons at Bowling Green State University.
Is your app missing?
Contact Jake Wharton or fork the project, update this page, and send a pull request!
Hint: It's in the gh-pages
branch.
Credits
© 2011 Jake Wharton — @JakeWharton ·+JakeWharton
Developed and distributed under the Apache License, Version 2.0.
Originally based on widgets developed by Patrik Åkerfeldt.
- ViewPagerIndicator
- ViewPagerIndicator
- ViewPagerIndicator
- ViewPagerIndicator
- ViewPagerIndicator
- ViewPagerIndicator
- ViewPagerIndicator
- viewpagerindicator
- viewpagerindicator
- ViewPagerIndicator
- ViewPagerIndicator
- ViewPagerIndicator
- ViewPagerIndicator
- ViewPagerIndicator
- ViewPagerIndicator
- Android-ViewPagerIndicator
- ViewPagerIndicator介绍
- 自定义ViewPagerIndicator
- linux设备驱动归纳总结(十三):1.触摸屏与ADC时钟
- Android 输入法键盘和activity页面遮挡问题解决
- Ubuntu12.04编译安装Octave
- MFC(多线程与聊天程序,孙鑫C++第十五讲笔记整理)
- 解决oracle11g的ORA-12505问题
- ViewPagerIndicator
- 数字统计
- ViewPager实现页面切换
- ViewPager多页面滑动切换以及动画效果(转)
- 【100题】第四十八题 移位数组的二分查找
- python相关软件下载地址
- 条款11: 为需要动态分配内存的类声明一个拷贝构造函数和一个赋值操作符
- listview异步加载图片(深度优化)(转载)
- acrobat页面显示问题