├── lib
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── vpi__colors.xml
│ │ │ │ ├── vpi__styles.xml
│ │ │ │ ├── vpi__defaults.xml
│ │ │ │ └── vpi__attrs.xml
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── vpi__tab_selected_holo.9.png
│ │ │ │ ├── vpi__tab_unselected_holo.9.png
│ │ │ │ ├── vpi__tab_selected_focused_holo.9.png
│ │ │ │ ├── vpi__tab_selected_pressed_holo.9.png
│ │ │ │ ├── vpi__tab_unselected_focused_holo.9.png
│ │ │ │ └── vpi__tab_unselected_pressed_holo.9.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── vpi__tab_selected_holo.9.png
│ │ │ │ ├── vpi__tab_unselected_holo.9.png
│ │ │ │ ├── vpi__tab_selected_focused_holo.9.png
│ │ │ │ ├── vpi__tab_selected_pressed_holo.9.png
│ │ │ │ ├── vpi__tab_unselected_focused_holo.9.png
│ │ │ │ └── vpi__tab_unselected_pressed_holo.9.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ ├── vpi__tab_selected_holo.9.png
│ │ │ │ ├── vpi__tab_unselected_holo.9.png
│ │ │ │ ├── vpi__tab_selected_focused_holo.9.png
│ │ │ │ ├── vpi__tab_selected_pressed_holo.9.png
│ │ │ │ ├── vpi__tab_unselected_focused_holo.9.png
│ │ │ │ └── vpi__tab_unselected_pressed_holo.9.png
│ │ │ ├── color
│ │ │ │ ├── vpi__dark_theme.xml
│ │ │ │ └── vpi__light_theme.xml
│ │ │ └── drawable
│ │ │ │ └── vpi__tab_indicator.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── viewpagerindicator
│ │ │ │ ├── IconPagerAdapter.java
│ │ │ │ ├── PageIndicator.java
│ │ │ │ ├── IconPageIndicator.java
│ │ │ │ ├── IcsLinearLayout.java
│ │ │ │ ├── TabPageIndicator.java
│ │ │ │ ├── UnderlinePageIndicator.java
│ │ │ │ └── LinePageIndicator.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── viewpagerindicator
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── viewpagerindicator
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── sample
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── icon.png
│ │ │ │ ├── perm_group_camera_normal.png
│ │ │ │ ├── perm_group_calendar_normal.png
│ │ │ │ ├── perm_group_camera_selected.png
│ │ │ │ ├── perm_group_location_normal.png
│ │ │ │ ├── custom_tab_indicator_divider.9.png
│ │ │ │ ├── custom_tab_indicator_focused.9.png
│ │ │ │ ├── perm_group_calendar_selected.png
│ │ │ │ ├── perm_group_location_selected.png
│ │ │ │ ├── custom_tab_indicator_selected.9.png
│ │ │ │ ├── perm_group_device_alarms_normal.png
│ │ │ │ ├── custom_tab_indicator_unselected.9.png
│ │ │ │ ├── perm_group_device_alarms_selected.png
│ │ │ │ ├── custom_tab_indicator_selected_pressed.9.png
│ │ │ │ ├── custom_tab_indicator_unselected_focused.9.png
│ │ │ │ └── custom_tab_indicator_unselected_pressed.9.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── icon.png
│ │ │ │ ├── perm_group_camera_normal.png
│ │ │ │ ├── perm_group_calendar_normal.png
│ │ │ │ ├── perm_group_camera_selected.png
│ │ │ │ ├── perm_group_location_normal.png
│ │ │ │ ├── custom_tab_indicator_divider.9.png
│ │ │ │ ├── perm_group_calendar_selected.png
│ │ │ │ ├── perm_group_location_selected.png
│ │ │ │ ├── custom_tab_indicator_selected.9.png
│ │ │ │ ├── perm_group_device_alarms_normal.png
│ │ │ │ ├── custom_tab_indicator_unselected.9.png
│ │ │ │ ├── perm_group_device_alarms_selected.png
│ │ │ │ ├── custom_tab_indicator_selected_focused.9.png
│ │ │ │ ├── custom_tab_indicator_selected_pressed.9.png
│ │ │ │ ├── custom_tab_indicator_unselected_focused.9.png
│ │ │ │ └── custom_tab_indicator_unselected_pressed.9.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ ├── icon.png
│ │ │ │ ├── perm_group_camera_normal.png
│ │ │ │ ├── perm_group_calendar_normal.png
│ │ │ │ ├── perm_group_camera_selected.png
│ │ │ │ ├── perm_group_location_normal.png
│ │ │ │ ├── perm_group_calendar_selected.png
│ │ │ │ ├── perm_group_location_selected.png
│ │ │ │ ├── custom_tab_indicator_divider.9.png
│ │ │ │ ├── custom_tab_indicator_selected.9.png
│ │ │ │ ├── perm_group_device_alarms_normal.png
│ │ │ │ ├── custom_tab_indicator_unselected.9.png
│ │ │ │ ├── perm_group_device_alarms_selected.png
│ │ │ │ ├── custom_tab_indicator_selected_focused.9.png
│ │ │ │ ├── custom_tab_indicator_selected_pressed.9.png
│ │ │ │ ├── custom_tab_indicator_unselected_focused.9.png
│ │ │ │ └── custom_tab_indicator_unselected_pressed.9.png
│ │ │ ├── drawable
│ │ │ │ ├── perm_group_camera.xml
│ │ │ │ ├── perm_group_calendar.xml
│ │ │ │ ├── perm_group_location.xml
│ │ │ │ ├── perm_group_device_alarms.xml
│ │ │ │ └── custom_tab_indicator.xml
│ │ │ ├── menu
│ │ │ │ └── menu.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ └── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── simple_underlines.xml
│ │ │ │ ├── simple_icons.xml
│ │ │ │ ├── simple_tabs.xml
│ │ │ │ ├── simple_lines.xml
│ │ │ │ ├── simple_circles.xml
│ │ │ │ ├── simple_titles.xml
│ │ │ │ ├── simple_circles_vertical.xml
│ │ │ │ ├── simple_titles_bottom.xml
│ │ │ │ ├── themed_underlines.xml
│ │ │ │ ├── themed_lines.xml
│ │ │ │ ├── themed_circles.xml
│ │ │ │ └── themed_titles.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── viewpagerindicator
│ │ │ │ └── sample
│ │ │ │ ├── SampleLinesDefault.java
│ │ │ │ ├── SampleIconsDefault.java
│ │ │ │ ├── SampleCirclesDefault.java
│ │ │ │ ├── SampleLinesStyledLayout.java
│ │ │ │ ├── SampleTitlesBottom.java
│ │ │ │ ├── SampleTitlesDefault.java
│ │ │ │ ├── SampleCirclesStyledLayout.java
│ │ │ │ ├── SampleTitlesStyledLayout.java
│ │ │ │ ├── SampleUnderlinesDefault.java
│ │ │ │ ├── SampleUnderlinesStyledLayout.java
│ │ │ │ ├── SampleLinesStyledTheme.java
│ │ │ │ ├── SampleCirclesSnap.java
│ │ │ │ ├── SampleCirclesStyledTheme.java
│ │ │ │ ├── SampleTitlesStyledTheme.java
│ │ │ │ ├── SampleUnderlinesStyledTheme.java
│ │ │ │ ├── SampleUnderlinesNoFade.java
│ │ │ │ ├── SampleCirclesInitialPage.java
│ │ │ │ ├── SampleTitlesInitialPage.java
│ │ │ │ ├── SampleTitlesTriangle.java
│ │ │ │ ├── SampleUnderlinesStyledMethods.java
│ │ │ │ ├── SampleLinesStyledMethods.java
│ │ │ │ ├── SampleCirclesStyledMethods.java
│ │ │ │ ├── SampleTitlesCenterClickListener.java
│ │ │ │ ├── SampleTitlesStyledMethods.java
│ │ │ │ ├── SampleCirclesWithListener.java
│ │ │ │ ├── SampleTitlesWithListener.java
│ │ │ │ ├── TestFragmentAdapter.java
│ │ │ │ ├── SampleTabsDefault.java
│ │ │ │ ├── SampleTabsStyled.java
│ │ │ │ ├── BaseSampleActivity.java
│ │ │ │ ├── SampleTabsWithIcons.java
│ │ │ │ ├── TestFragment.java
│ │ │ │ └── ListSamples.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── viewpagerindicator
│ │ │ └── sample
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── viewpagerindicator
│ │ └── sample
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── .idea
├── copyright
│ └── profiles_settings.xml
├── vcs.xml
├── modules.xml
├── runConfigurations.xml
├── gradle.xml
├── compiler.xml
└── misc.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── README.md
├── gradle.properties
├── gradlew.bat
└── gradlew
/lib/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/sample/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':sample', ':lib'
2 |
--------------------------------------------------------------------------------
/lib/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | lib
3 |
4 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/sample/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ViewPagerIndicator
3 |
4 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/vpi__tab_selected_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-hdpi/vpi__tab_selected_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/vpi__tab_selected_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-mdpi/vpi__tab_selected_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/vpi__tab_selected_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-xhdpi/vpi__tab_selected_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/vpi__tab_unselected_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-hdpi/vpi__tab_unselected_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/vpi__tab_unselected_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-mdpi/vpi__tab_unselected_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/vpi__tab_unselected_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-xhdpi/vpi__tab_unselected_holo.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/perm_group_camera_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/perm_group_camera_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/perm_group_camera_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/perm_group_camera_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/perm_group_camera_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/perm_group_camera_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/perm_group_calendar_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/perm_group_calendar_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/perm_group_camera_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/perm_group_camera_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/perm_group_location_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/perm_group_location_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/perm_group_calendar_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/perm_group_calendar_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/perm_group_camera_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/perm_group_camera_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/perm_group_location_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/perm_group_location_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/perm_group_calendar_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/perm_group_calendar_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/perm_group_camera_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/perm_group_camera_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/perm_group_location_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/perm_group_location_normal.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/vpi__tab_selected_focused_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-hdpi/vpi__tab_selected_focused_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/vpi__tab_selected_pressed_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-hdpi/vpi__tab_selected_pressed_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/vpi__tab_selected_focused_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-mdpi/vpi__tab_selected_focused_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/vpi__tab_selected_pressed_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-mdpi/vpi__tab_selected_pressed_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/vpi__tab_selected_focused_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-xhdpi/vpi__tab_selected_focused_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/vpi__tab_selected_pressed_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-xhdpi/vpi__tab_selected_pressed_holo.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/custom_tab_indicator_divider.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/custom_tab_indicator_divider.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/custom_tab_indicator_focused.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/custom_tab_indicator_focused.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/perm_group_calendar_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/perm_group_calendar_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/perm_group_location_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/perm_group_location_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/custom_tab_indicator_divider.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/custom_tab_indicator_divider.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/perm_group_calendar_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/perm_group_calendar_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/perm_group_location_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/perm_group_location_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/perm_group_calendar_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/perm_group_calendar_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/perm_group_location_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/perm_group_location_selected.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/vpi__tab_unselected_focused_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-hdpi/vpi__tab_unselected_focused_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-hdpi/vpi__tab_unselected_pressed_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-hdpi/vpi__tab_unselected_pressed_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/vpi__tab_unselected_focused_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-mdpi/vpi__tab_unselected_focused_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-mdpi/vpi__tab_unselected_pressed_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-mdpi/vpi__tab_unselected_pressed_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/vpi__tab_unselected_focused_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-xhdpi/vpi__tab_unselected_focused_holo.9.png
--------------------------------------------------------------------------------
/lib/src/main/res/drawable-xhdpi/vpi__tab_unselected_pressed_holo.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/lib/src/main/res/drawable-xhdpi/vpi__tab_unselected_pressed_holo.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/custom_tab_indicator_selected.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/custom_tab_indicator_selected.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/perm_group_device_alarms_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/perm_group_device_alarms_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/custom_tab_indicator_selected.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/custom_tab_indicator_selected.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/perm_group_device_alarms_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/perm_group_device_alarms_normal.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_divider.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_divider.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_selected.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_selected.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/perm_group_device_alarms_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/perm_group_device_alarms_normal.png
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/custom_tab_indicator_unselected.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/custom_tab_indicator_unselected.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/perm_group_device_alarms_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/perm_group_device_alarms_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/custom_tab_indicator_unselected.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/custom_tab_indicator_unselected.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/perm_group_device_alarms_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/perm_group_device_alarms_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_unselected.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_unselected.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/perm_group_device_alarms_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/perm_group_device_alarms_selected.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/custom_tab_indicator_selected_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/custom_tab_indicator_selected_pressed.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/custom_tab_indicator_selected_focused.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/custom_tab_indicator_selected_focused.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/custom_tab_indicator_selected_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/custom_tab_indicator_selected_pressed.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_selected_focused.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_selected_focused.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_selected_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_selected_pressed.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/custom_tab_indicator_unselected_focused.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/custom_tab_indicator_unselected_focused.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/custom_tab_indicator_unselected_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-hdpi/custom_tab_indicator_unselected_pressed.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/custom_tab_indicator_unselected_focused.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/custom_tab_indicator_unselected_focused.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/custom_tab_indicator_unselected_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-mdpi/custom_tab_indicator_unselected_pressed.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_unselected_focused.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_unselected_focused.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_unselected_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncleleonfan/ViewPagerIndicator/HEAD/sample/src/main/res/drawable-xhdpi/custom_tab_indicator_unselected_pressed.9.png
--------------------------------------------------------------------------------
/sample/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/viewpagerindicator/IconPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator;
2 |
3 | public interface IconPagerAdapter {
4 | /**
5 | * Get icon representing the page at {@code index} in the adapter.
6 | */
7 | int getIconResId(int index);
8 |
9 | // From PagerAdapter
10 | int getCount();
11 | }
12 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/perm_group_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/perm_group_calendar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/perm_group_location.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/lib/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/perm_group_device_alarms.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 原项目 #
2 | 本项目是JakeWharton大神作品ViewPagerIndicator的Android Studio版,方便开发者在Android Studio中使用。
3 | 原项目地址[https://github.com/JakeWharton/ViewPagerIndicator](https://github.com/JakeWharton/ViewPagerIndicator)
4 |
5 | # 使用方式 #
6 | allprojects {
7 | repositories {
8 | ...
9 | maven { url 'https://jitpack.io' }
10 | }
11 | }
12 |
13 | dependencies {
14 | compile 'com.github.uncleleonfan:ViewPagerIndicator:1.0.0'
15 | }
--------------------------------------------------------------------------------
/lib/src/test/java/com/viewpagerindicator/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/sample/src/test/java/com/viewpagerindicator/sample/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/lib/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\software\AndroidStudio\android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/sample/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\software\AndroidStudio\android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleLinesDefault.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.LinePageIndicator;
6 |
7 | public class SampleLinesDefault extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_lines);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | mIndicator = (LinePageIndicator)findViewById(R.id.indicator);
19 | mIndicator.setViewPager(mPager);
20 | }
21 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleIconsDefault.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.IconPageIndicator;
6 |
7 | public class SampleIconsDefault extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_icons);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | mIndicator = (IconPageIndicator)findViewById(R.id.indicator);
19 | mIndicator.setViewPager(mPager);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleCirclesDefault.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.CirclePageIndicator;
6 |
7 | public class SampleCirclesDefault extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_circles);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | mIndicator = (CirclePageIndicator)findViewById(R.id.indicator);
19 | mIndicator.setViewPager(mPager);
20 | }
21 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleLinesStyledLayout.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.LinePageIndicator;
6 |
7 | public class SampleLinesStyledLayout extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.themed_lines);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | mIndicator = (LinePageIndicator)findViewById(R.id.indicator);
19 | mIndicator.setViewPager(mPager);
20 | }
21 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTitlesBottom.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.TitlePageIndicator;
6 |
7 | public class SampleTitlesBottom extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_titles_bottom);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | mIndicator = (TitlePageIndicator)findViewById(R.id.indicator);
19 | mIndicator.setViewPager(mPager);
20 | }
21 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTitlesDefault.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 |
6 | import com.viewpagerindicator.TitlePageIndicator;
7 |
8 | public class SampleTitlesDefault extends BaseSampleActivity {
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.simple_titles);
13 |
14 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
15 |
16 | mPager = (ViewPager)findViewById(R.id.pager);
17 | mPager.setAdapter(mAdapter);
18 |
19 | mIndicator = (TitlePageIndicator)findViewById(R.id.indicator);
20 | mIndicator.setViewPager(mPager);
21 | }
22 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleCirclesStyledLayout.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.CirclePageIndicator;
6 |
7 | public class SampleCirclesStyledLayout extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.themed_circles);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | mIndicator = (CirclePageIndicator)findViewById(R.id.indicator);
19 | mIndicator.setViewPager(mPager);
20 | }
21 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTitlesStyledLayout.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 |
6 | import com.viewpagerindicator.TitlePageIndicator;
7 |
8 | public class SampleTitlesStyledLayout extends BaseSampleActivity {
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.themed_titles);
13 |
14 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
15 |
16 | mPager = (ViewPager)findViewById(R.id.pager);
17 | mPager.setAdapter(mAdapter);
18 |
19 | mIndicator = (TitlePageIndicator)findViewById(R.id.indicator);
20 | mIndicator.setViewPager(mPager);
21 | }
22 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleUnderlinesDefault.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.UnderlinePageIndicator;
6 |
7 | public class SampleUnderlinesDefault extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_underlines);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | mIndicator = (UnderlinePageIndicator)findViewById(R.id.indicator);
19 | mIndicator.setViewPager(mPager);
20 | }
21 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleUnderlinesStyledLayout.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.UnderlinePageIndicator;
6 |
7 | public class SampleUnderlinesStyledLayout extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.themed_underlines);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | mIndicator = (UnderlinePageIndicator)findViewById(R.id.indicator);
19 | mIndicator.setViewPager(mPager);
20 | }
21 | }
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleLinesStyledTheme.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.LinePageIndicator;
6 |
7 | public class SampleLinesStyledTheme extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 |
12 | //The look of this sample is set via a style in the manifest
13 | setContentView(R.layout.simple_lines);
14 |
15 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
16 |
17 | mPager = (ViewPager)findViewById(R.id.pager);
18 | mPager.setAdapter(mAdapter);
19 |
20 | mIndicator = (LinePageIndicator)findViewById(R.id.indicator);
21 | mIndicator.setViewPager(mPager);
22 | }
23 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleCirclesSnap.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.CirclePageIndicator;
6 |
7 | public class SampleCirclesSnap extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_circles);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | CirclePageIndicator indicator = (CirclePageIndicator)findViewById(R.id.indicator);
19 | mIndicator = indicator;
20 | indicator.setViewPager(mPager);
21 | indicator.setSnap(true);
22 | }
23 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleCirclesStyledTheme.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.CirclePageIndicator;
6 |
7 | public class SampleCirclesStyledTheme extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 |
12 | //The look of this sample is set via a style in the manifest
13 | setContentView(R.layout.simple_circles);
14 |
15 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
16 |
17 | mPager = (ViewPager)findViewById(R.id.pager);
18 | mPager.setAdapter(mAdapter);
19 |
20 | mIndicator = (CirclePageIndicator)findViewById(R.id.indicator);
21 | mIndicator.setViewPager(mPager);
22 | }
23 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTitlesStyledTheme.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 |
6 | import com.viewpagerindicator.TitlePageIndicator;
7 |
8 | public class SampleTitlesStyledTheme extends BaseSampleActivity {
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 |
13 | //The look of this sample is set via a style in the manifest
14 | setContentView(R.layout.simple_titles);
15 |
16 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
17 |
18 | mPager = (ViewPager)findViewById(R.id.pager);
19 | mPager.setAdapter(mAdapter);
20 |
21 | mIndicator = (TitlePageIndicator)findViewById(R.id.indicator);
22 | mIndicator.setViewPager(mPager);
23 | }
24 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleUnderlinesStyledTheme.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.UnderlinePageIndicator;
6 |
7 | public class SampleUnderlinesStyledTheme extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 |
12 | //The look of this sample is set via a style in the manifest
13 | setContentView(R.layout.simple_underlines);
14 |
15 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
16 |
17 | mPager = (ViewPager)findViewById(R.id.pager);
18 | mPager.setAdapter(mAdapter);
19 |
20 | mIndicator = (UnderlinePageIndicator)findViewById(R.id.indicator);
21 | mIndicator.setViewPager(mPager);
22 | }
23 | }
--------------------------------------------------------------------------------
/lib/src/androidTest/java/com/viewpagerindicator/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.viewpagerindicator.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleUnderlinesNoFade.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.UnderlinePageIndicator;
6 |
7 | public class SampleUnderlinesNoFade extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_underlines);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | UnderlinePageIndicator indicator = (UnderlinePageIndicator)findViewById(R.id.indicator);
19 | indicator.setViewPager(mPager);
20 | indicator.setFades(false);
21 | mIndicator = indicator;
22 | }
23 | }
--------------------------------------------------------------------------------
/sample/src/androidTest/java/com/viewpagerindicator/sample/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.viewpagerindicator.sample", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleCirclesInitialPage.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.CirclePageIndicator;
6 |
7 | public class SampleCirclesInitialPage extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_circles);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | mIndicator = (CirclePageIndicator)findViewById(R.id.indicator);
19 | mIndicator.setViewPager(mPager);
20 | mIndicator.setCurrentItem(mAdapter.getCount() - 1);
21 |
22 | //You can also do: indicator.setViewPager(pager, initialPage);
23 | }
24 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTitlesInitialPage.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 |
6 | import com.viewpagerindicator.TitlePageIndicator;
7 |
8 | public class SampleTitlesInitialPage extends BaseSampleActivity {
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.simple_titles);
13 |
14 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
15 |
16 | mPager = (ViewPager)findViewById(R.id.pager);
17 | mPager.setAdapter(mAdapter);
18 |
19 | mIndicator = (TitlePageIndicator)findViewById(R.id.indicator);
20 | mIndicator.setViewPager(mPager);
21 | mIndicator.setCurrentItem(mAdapter.getCount() - 1);
22 |
23 | //You can also do: indicator.setViewPager(pager, initialPage);
24 | }
25 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTitlesTriangle.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 |
6 | import com.viewpagerindicator.TitlePageIndicator;
7 | import com.viewpagerindicator.TitlePageIndicator.IndicatorStyle;
8 |
9 | public class SampleTitlesTriangle extends BaseSampleActivity {
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.simple_titles);
14 |
15 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
16 |
17 | mPager = (ViewPager)findViewById(R.id.pager);
18 | mPager.setAdapter(mAdapter);
19 |
20 | TitlePageIndicator indicator = (TitlePageIndicator)findViewById(R.id.indicator);
21 | indicator.setViewPager(mPager);
22 | indicator.setFooterIndicatorStyle(IndicatorStyle.Triangle);
23 | mIndicator = indicator;
24 | }
25 | }
--------------------------------------------------------------------------------
/sample/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | applicationId "com.viewpagerindicator.sample"
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | versionCode 65
11 | versionName "2.4.1"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(include: ['*.jar'], dir: 'libs')
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:25.1.1'
28 | testCompile 'junit:junit:4.12'
29 | compile project(':lib')
30 | }
31 |
--------------------------------------------------------------------------------
/lib/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'com.github.dcendents.android-maven'
3 | group='com.github.uncleleonfan'
4 |
5 | android {
6 | compileSdkVersion 25
7 | buildToolsVersion "25.0.2"
8 |
9 | defaultConfig {
10 | minSdkVersion 15
11 | targetSdkVersion 25
12 | versionCode 1
13 | versionName "1.0"
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 |
17 | }
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | }
25 |
26 | dependencies {
27 | compile fileTree(dir: 'libs', include: ['*.jar'])
28 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
29 | exclude group: 'com.android.support', module: 'support-annotations'
30 | })
31 | compile 'com.android.support:appcompat-v7:25.1.1'
32 | testCompile 'junit:junit:4.12'
33 | }
34 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleUnderlinesStyledMethods.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.UnderlinePageIndicator;
6 |
7 | public class SampleUnderlinesStyledMethods extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_underlines);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | UnderlinePageIndicator indicator = (UnderlinePageIndicator)findViewById(R.id.indicator);
19 | mIndicator = indicator;
20 | indicator.setViewPager(mPager);
21 | indicator.setSelectedColor(0xFFCC0000);
22 | indicator.setBackgroundColor(0xFFCCCCCC);
23 | indicator.setFadeDelay(1000);
24 | indicator.setFadeLength(1000);
25 | }
26 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleLinesStyledMethods.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.LinePageIndicator;
6 |
7 | public class SampleLinesStyledMethods extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_lines);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | LinePageIndicator indicator = (LinePageIndicator)findViewById(R.id.indicator);
19 | mIndicator = indicator;
20 | indicator.setViewPager(mPager);
21 |
22 | final float density = getResources().getDisplayMetrics().density;
23 | indicator.setSelectedColor(0x88FF0000);
24 | indicator.setUnselectedColor(0xFF888888);
25 | indicator.setStrokeWidth(4 * density);
26 | indicator.setLineWidth(30 * density);
27 | }
28 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleCirclesStyledMethods.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import com.viewpagerindicator.CirclePageIndicator;
6 |
7 | public class SampleCirclesStyledMethods extends BaseSampleActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.simple_circles);
12 |
13 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
14 |
15 | mPager = (ViewPager)findViewById(R.id.pager);
16 | mPager.setAdapter(mAdapter);
17 |
18 | CirclePageIndicator indicator = (CirclePageIndicator)findViewById(R.id.indicator);
19 | mIndicator = indicator;
20 | indicator.setViewPager(mPager);
21 |
22 | final float density = getResources().getDisplayMetrics().density;
23 | indicator.setBackgroundColor(0xFFCCCCCC);
24 | indicator.setRadius(10 * density);
25 | indicator.setPageColor(0x880000FF);
26 | indicator.setFillColor(0xFF888888);
27 | indicator.setStrokeColor(0xFF000000);
28 | indicator.setStrokeWidth(2 * density);
29 | }
30 | }
--------------------------------------------------------------------------------
/sample/src/main/res/layout/simple_underlines.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
29 |
34 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/simple_icons.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
29 |
34 |
35 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/simple_tabs.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTitlesCenterClickListener.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import android.widget.Toast;
6 |
7 | import com.viewpagerindicator.TitlePageIndicator;
8 | import com.viewpagerindicator.TitlePageIndicator.IndicatorStyle;
9 | import com.viewpagerindicator.TitlePageIndicator.OnCenterItemClickListener;
10 |
11 | public class SampleTitlesCenterClickListener extends BaseSampleActivity implements OnCenterItemClickListener {
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.simple_titles);
16 |
17 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
18 |
19 | mPager = (ViewPager)findViewById(R.id.pager);
20 | mPager.setAdapter(mAdapter);
21 |
22 | TitlePageIndicator indicator = (TitlePageIndicator)findViewById(R.id.indicator);
23 | indicator.setViewPager(mPager);
24 | indicator.setFooterIndicatorStyle(IndicatorStyle.Underline);
25 | indicator.setOnCenterItemClickListener(this);
26 | mIndicator = indicator;
27 | }
28 |
29 | @Override
30 | public void onCenterItemClick(int position) {
31 | Toast.makeText(this, "You clicked the center title!", Toast.LENGTH_SHORT).show();
32 | }
33 | }
--------------------------------------------------------------------------------
/sample/src/main/res/layout/simple_lines.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
29 |
35 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/simple_circles.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
29 |
35 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/simple_titles.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
29 |
35 |
36 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/simple_circles_vertical.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
29 |
35 |
--------------------------------------------------------------------------------
/lib/src/main/res/color/vpi__dark_theme.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/lib/src/main/res/values/vpi__colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | #ff000000
19 | #fff3f3f3
20 | @color/vpi__background_holo_light
21 | @color/vpi__background_holo_dark
22 | #ff4c4c4c
23 | #ffb2b2b2
24 | @color/vpi__bright_foreground_holo_light
25 | @color/vpi__bright_foreground_holo_dark
26 |
27 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTitlesStyledMethods.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 |
6 | import com.viewpagerindicator.TitlePageIndicator;
7 | import com.viewpagerindicator.TitlePageIndicator.IndicatorStyle;
8 |
9 | public class SampleTitlesStyledMethods extends BaseSampleActivity {
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.simple_titles);
14 |
15 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
16 |
17 | mPager = (ViewPager)findViewById(R.id.pager);
18 | mPager.setAdapter(mAdapter);
19 |
20 | TitlePageIndicator indicator = (TitlePageIndicator)findViewById(R.id.indicator);
21 | mIndicator = indicator;
22 | indicator.setViewPager(mPager);
23 |
24 | final float density = getResources().getDisplayMetrics().density;
25 | indicator.setBackgroundColor(0x18FF0000);
26 | indicator.setFooterColor(0xFFAA2222);
27 | indicator.setFooterLineHeight(1 * density); //1dp
28 | indicator.setFooterIndicatorHeight(3 * density); //3dp
29 | indicator.setFooterIndicatorStyle(IndicatorStyle.Underline);
30 | indicator.setTextColor(0xAA000000);
31 | indicator.setSelectedColor(0xFF000000);
32 | indicator.setSelectedBold(true);
33 | }
34 | }
--------------------------------------------------------------------------------
/lib/src/main/res/color/vpi__light_theme.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleCirclesWithListener.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import android.widget.Toast;
6 | import com.viewpagerindicator.CirclePageIndicator;
7 |
8 | public class SampleCirclesWithListener extends BaseSampleActivity {
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.simple_circles);
13 |
14 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
15 |
16 | mPager = (ViewPager)findViewById(R.id.pager);
17 | mPager.setAdapter(mAdapter);
18 |
19 | mIndicator = (CirclePageIndicator)findViewById(R.id.indicator);
20 | mIndicator.setViewPager(mPager);
21 |
22 | //We set this on the indicator, NOT the pager
23 | mIndicator.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
24 | @Override
25 | public void onPageSelected(int position) {
26 | Toast.makeText(SampleCirclesWithListener.this, "Changed to page " + position, Toast.LENGTH_SHORT).show();
27 | }
28 |
29 | @Override
30 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
31 | }
32 |
33 | @Override
34 | public void onPageScrollStateChanged(int state) {
35 | }
36 | });
37 | }
38 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTitlesWithListener.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.view.ViewPager;
5 | import android.widget.Toast;
6 |
7 | import com.viewpagerindicator.TitlePageIndicator;
8 |
9 | public class SampleTitlesWithListener extends BaseSampleActivity {
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.simple_titles);
14 |
15 | mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
16 |
17 | mPager = (ViewPager)findViewById(R.id.pager);
18 | mPager.setAdapter(mAdapter);
19 |
20 | mIndicator = (TitlePageIndicator)findViewById(R.id.indicator);
21 | mIndicator.setViewPager(mPager);
22 |
23 | //We set this on the indicator, NOT the pager
24 | mIndicator.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
25 | @Override
26 | public void onPageSelected(int position) {
27 | Toast.makeText(SampleTitlesWithListener.this, "Changed to page " + position, Toast.LENGTH_SHORT).show();
28 | }
29 |
30 | @Override
31 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
32 | }
33 |
34 | @Override
35 | public void onPageScrollStateChanged(int state) {
36 | }
37 | });
38 | }
39 | }
--------------------------------------------------------------------------------
/sample/src/main/res/layout/simple_titles_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
23 |
24 |
30 |
37 |
38 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/themed_underlines.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
23 |
24 |
30 |
39 |
40 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/TestFragmentAdapter.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentPagerAdapter;
6 | import com.viewpagerindicator.IconPagerAdapter;
7 |
8 | class TestFragmentAdapter extends FragmentPagerAdapter implements IconPagerAdapter {
9 | protected static final String[] CONTENT = new String[] { "This", "Is", "A", "Test", };
10 | protected static final int[] ICONS = new int[] {
11 | R.drawable.perm_group_calendar,
12 | R.drawable.perm_group_camera,
13 | R.drawable.perm_group_device_alarms,
14 | R.drawable.perm_group_location
15 | };
16 |
17 | private int mCount = CONTENT.length;
18 |
19 | public TestFragmentAdapter(FragmentManager fm) {
20 | super(fm);
21 | }
22 |
23 | @Override
24 | public Fragment getItem(int position) {
25 | return TestFragment.newInstance(CONTENT[position % CONTENT.length]);
26 | }
27 |
28 | @Override
29 | public int getCount() {
30 | return mCount;
31 | }
32 |
33 | @Override
34 | public CharSequence getPageTitle(int position) {
35 | return TestFragmentAdapter.CONTENT[position % CONTENT.length];
36 | }
37 |
38 | @Override
39 | public int getIconResId(int index) {
40 | return ICONS[index % ICONS.length];
41 | }
42 |
43 | public void setCount(int count) {
44 | if (count > 0 && count <= 10) {
45 | mCount = count;
46 | notifyDataSetChanged();
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/sample/src/main/res/layout/themed_lines.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
23 |
24 |
30 |
40 |
41 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/themed_circles.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
23 |
24 |
30 |
42 |
43 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTabsDefault.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.support.v4.app.FragmentActivity;
6 | import android.support.v4.app.FragmentManager;
7 | import android.support.v4.app.FragmentPagerAdapter;
8 | import android.support.v4.view.ViewPager;
9 | import com.viewpagerindicator.TabPageIndicator;
10 |
11 | public class SampleTabsDefault extends FragmentActivity {
12 | private static final String[] CONTENT = new String[] { "Recent", "Artists", "Albums", "Songs", "Playlists", "Genres" };
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.simple_tabs);
18 |
19 | FragmentPagerAdapter adapter = new GoogleMusicAdapter(getSupportFragmentManager());
20 |
21 | ViewPager pager = (ViewPager)findViewById(R.id.pager);
22 | pager.setAdapter(adapter);
23 |
24 | TabPageIndicator indicator = (TabPageIndicator)findViewById(R.id.indicator);
25 | indicator.setViewPager(pager);
26 | }
27 |
28 | class GoogleMusicAdapter extends FragmentPagerAdapter {
29 | public GoogleMusicAdapter(FragmentManager fm) {
30 | super(fm);
31 | }
32 |
33 | @Override
34 | public Fragment getItem(int position) {
35 | return TestFragment.newInstance(CONTENT[position % CONTENT.length]);
36 | }
37 |
38 | @Override
39 | public CharSequence getPageTitle(int position) {
40 | return CONTENT[position % CONTENT.length].toUpperCase();
41 | }
42 |
43 | @Override
44 | public int getCount() {
45 | return CONTENT.length;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTabsStyled.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.support.v4.app.FragmentActivity;
6 | import android.support.v4.app.FragmentManager;
7 | import android.support.v4.app.FragmentPagerAdapter;
8 | import android.support.v4.view.ViewPager;
9 | import com.viewpagerindicator.TabPageIndicator;
10 |
11 | public class SampleTabsStyled extends FragmentActivity {
12 | private static final String[] CONTENT = new String[] { "Recent", "Artists", "Albums", "Songs", "Playlists", "Genres" };
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.simple_tabs);
18 |
19 | FragmentPagerAdapter adapter = new GoogleMusicAdapter(getSupportFragmentManager());
20 |
21 | ViewPager pager = (ViewPager)findViewById(R.id.pager);
22 | pager.setAdapter(adapter);
23 |
24 | TabPageIndicator indicator = (TabPageIndicator)findViewById(R.id.indicator);
25 | indicator.setViewPager(pager);
26 | }
27 |
28 | class GoogleMusicAdapter extends FragmentPagerAdapter {
29 | public GoogleMusicAdapter(FragmentManager fm) {
30 | super(fm);
31 | }
32 |
33 | @Override
34 | public Fragment getItem(int position) {
35 | return TestFragment.newInstance(CONTENT[position % CONTENT.length]);
36 | }
37 |
38 | @Override
39 | public CharSequence getPageTitle(int position) {
40 | return CONTENT[position % CONTENT.length].toUpperCase();
41 | }
42 |
43 | @Override
44 | public int getCount() {
45 | return CONTENT.length;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/themed_titles.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
23 |
24 |
38 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/BaseSampleActivity.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import java.util.Random;
4 |
5 | import com.viewpagerindicator.PageIndicator;
6 |
7 | import android.support.v4.app.FragmentActivity;
8 | import android.support.v4.view.ViewPager;
9 | import android.view.Menu;
10 | import android.view.MenuItem;
11 | import android.widget.Toast;
12 |
13 | public abstract class BaseSampleActivity extends FragmentActivity {
14 | private static final Random RANDOM = new Random();
15 |
16 | TestFragmentAdapter mAdapter;
17 | ViewPager mPager;
18 | PageIndicator mIndicator;
19 |
20 | @Override
21 | public boolean onCreateOptionsMenu(Menu menu) {
22 | getMenuInflater().inflate(R.menu.menu, menu);
23 | return true;
24 | }
25 |
26 | @Override
27 | public boolean onOptionsItemSelected(MenuItem item) {
28 | switch (item.getItemId()) {
29 | case R.id.random:
30 | final int page = RANDOM.nextInt(mAdapter.getCount());
31 | Toast.makeText(this, "Changing to page " + page, Toast.LENGTH_SHORT);
32 | mPager.setCurrentItem(page);
33 | return true;
34 |
35 | case R.id.add_page:
36 | if (mAdapter.getCount() < 10) {
37 | mAdapter.setCount(mAdapter.getCount() + 1);
38 | mIndicator.notifyDataSetChanged();
39 | }
40 | return true;
41 |
42 | case R.id.remove_page:
43 | if (mAdapter.getCount() > 1) {
44 | mAdapter.setCount(mAdapter.getCount() - 1);
45 | mIndicator.notifyDataSetChanged();
46 | }
47 | return true;
48 | }
49 | return super.onOptionsItemSelected(item);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/viewpagerindicator/PageIndicator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Patrik Akerfeldt
3 | * Copyright (C) 2011 Jake Wharton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.viewpagerindicator;
19 |
20 | import android.support.v4.view.ViewPager;
21 |
22 | /**
23 | * A PageIndicator is responsible to show an visual indicator on the total views
24 | * number and the current visible view.
25 | */
26 | public interface PageIndicator extends ViewPager.OnPageChangeListener {
27 | /**
28 | * Bind the indicator to a ViewPager.
29 | *
30 | * @param view
31 | */
32 | void setViewPager(ViewPager view);
33 |
34 | /**
35 | * Bind the indicator to a ViewPager.
36 | *
37 | * @param view
38 | * @param initialPosition
39 | */
40 | void setViewPager(ViewPager view, int initialPosition);
41 |
42 | /**
43 | * Set the current page of both the ViewPager and indicator.
44 | *
45 | * This must be used if you need to set the page before
46 | * the views are drawn on screen (e.g., default start page).
47 | *
48 | * @param item
49 | */
50 | void setCurrentItem(int item);
51 |
52 | /**
53 | * Set a page change listener which will receive forwarded events.
54 | *
55 | * @param listener
56 | */
57 | void setOnPageChangeListener(ViewPager.OnPageChangeListener listener);
58 |
59 | /**
60 | * Notify the indicator that the fragment list has changed.
61 | */
62 | void notifyDataSetChanged();
63 | }
64 |
--------------------------------------------------------------------------------
/lib/src/main/res/values/vpi__styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
22 |
23 |
25 |
26 |
37 |
38 |
42 |
43 |
47 |
48 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/SampleTabsWithIcons.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.support.v4.app.FragmentActivity;
6 | import android.support.v4.app.FragmentManager;
7 | import android.support.v4.app.FragmentPagerAdapter;
8 | import android.support.v4.view.ViewPager;
9 | import com.viewpagerindicator.IconPagerAdapter;
10 | import com.viewpagerindicator.TabPageIndicator;
11 |
12 | public class SampleTabsWithIcons extends FragmentActivity {
13 | private static final String[] CONTENT = new String[] { "Calendar", "Camera", "Alarms", "Location" };
14 | private static final int[] ICONS = new int[] {
15 | R.drawable.perm_group_calendar,
16 | R.drawable.perm_group_camera,
17 | R.drawable.perm_group_device_alarms,
18 | R.drawable.perm_group_location,
19 | };
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | setContentView(R.layout.simple_tabs);
25 |
26 | FragmentPagerAdapter adapter = new GoogleMusicAdapter(getSupportFragmentManager());
27 |
28 | ViewPager pager = (ViewPager)findViewById(R.id.pager);
29 | pager.setAdapter(adapter);
30 |
31 | TabPageIndicator indicator = (TabPageIndicator)findViewById(R.id.indicator);
32 | indicator.setViewPager(pager);
33 | }
34 |
35 | class GoogleMusicAdapter extends FragmentPagerAdapter implements IconPagerAdapter {
36 | public GoogleMusicAdapter(FragmentManager fm) {
37 | super(fm);
38 | }
39 |
40 | @Override
41 | public Fragment getItem(int position) {
42 | return TestFragment.newInstance(CONTENT[position % CONTENT.length]);
43 | }
44 |
45 | @Override
46 | public CharSequence getPageTitle(int position) {
47 | return CONTENT[position % CONTENT.length].toUpperCase();
48 | }
49 |
50 | @Override public int getIconResId(int index) {
51 | return ICONS[index];
52 | }
53 |
54 | @Override
55 | public int getCount() {
56 | return CONTENT.length;
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/TestFragment.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.view.Gravity;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.LinearLayout;
10 | import android.widget.LinearLayout.LayoutParams;
11 | import android.widget.TextView;
12 |
13 | public final class TestFragment extends Fragment {
14 | private static final String KEY_CONTENT = "TestFragment:Content";
15 |
16 | public static TestFragment newInstance(String content) {
17 | TestFragment fragment = new TestFragment();
18 |
19 | StringBuilder builder = new StringBuilder();
20 | for (int i = 0; i < 20; i++) {
21 | builder.append(content).append(" ");
22 | }
23 | builder.deleteCharAt(builder.length() - 1);
24 | fragment.mContent = builder.toString();
25 |
26 | return fragment;
27 | }
28 |
29 | private String mContent = "???";
30 |
31 | @Override
32 | public void onCreate(Bundle savedInstanceState) {
33 | super.onCreate(savedInstanceState);
34 |
35 | if ((savedInstanceState != null) && savedInstanceState.containsKey(KEY_CONTENT)) {
36 | mContent = savedInstanceState.getString(KEY_CONTENT);
37 | }
38 | }
39 |
40 | @Override
41 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
42 | TextView text = new TextView(getActivity());
43 | text.setGravity(Gravity.CENTER);
44 | text.setText(mContent);
45 | text.setTextSize(20 * getResources().getDisplayMetrics().density);
46 | text.setPadding(20, 20, 20, 20);
47 |
48 | LinearLayout layout = new LinearLayout(getActivity());
49 | layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
50 | layout.setGravity(Gravity.CENTER);
51 | layout.addView(text);
52 |
53 | return layout;
54 | }
55 |
56 | @Override
57 | public void onSaveInstanceState(Bundle outState) {
58 | super.onSaveInstanceState(outState);
59 | outState.putString(KEY_CONTENT, mContent);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/lib/src/main/res/drawable/vpi__tab_indicator.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/custom_tab_indicator.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/lib/src/main/res/values/vpi__defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | true
19 | #FFFFFFFF
20 | #00000000
21 | 0
22 | 3dp
23 | false
24 | #FFDDDDDD
25 | 1dp
26 |
27 | 12dp
28 | 4dp
29 | 1dp
30 | #FF33B5E5
31 | #FFBBBBBB
32 | true
33 |
34 | 4dp
35 | #FF33B5E5
36 | 2dp
37 | 2
38 | 4dp
39 | 20dp
40 | 7dp
41 | 0
42 | #FFFFFFFF
43 | true
44 | #BBFFFFFF
45 | 15dp
46 | 5dp
47 | 7dp
48 |
49 | true
50 | 300
51 | 400
52 | #FF33B5E5
53 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
25 |
26 |
36 |
37 |
43 |
44 |
51 |
52 |
65 |
66 |
69 |
70 |
76 |
77 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/viewpagerindicator/sample/ListSamples.java:
--------------------------------------------------------------------------------
1 | package com.viewpagerindicator.sample;
2 |
3 | import java.text.Collator;
4 | import java.util.ArrayList;
5 | import java.util.Collections;
6 | import java.util.Comparator;
7 | import java.util.HashMap;
8 | import java.util.List;
9 | import java.util.Map;
10 | import android.app.ListActivity;
11 | import android.content.Intent;
12 | import android.content.pm.PackageManager;
13 | import android.content.pm.ResolveInfo;
14 | import android.os.Bundle;
15 | import android.view.View;
16 | import android.widget.ListView;
17 | import android.widget.SimpleAdapter;
18 |
19 | public class ListSamples extends ListActivity {
20 |
21 | @Override
22 | public void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 |
25 | Intent intent = getIntent();
26 | String path = intent.getStringExtra("com.jakewharton.android.viewpagerindicator.sample.Path");
27 |
28 | if (path == null) {
29 | path = "";
30 | }
31 |
32 | setListAdapter(new SimpleAdapter(this, getData(path),
33 | android.R.layout.simple_list_item_1, new String[] { "title" },
34 | new int[] { android.R.id.text1 }));
35 | getListView().setTextFilterEnabled(true);
36 | }
37 |
38 | protected List