public static class PopTabAdapter.Builder
extends com.tompee.funtablayout.BaseAdapter.BaseBuilder
| Constructor and Description |
|---|
Builder(Context context)
Creates a builder for a simple tab adapter
|
| Modifier and Type | Method and Description |
|---|---|
PopTabAdapter |
build()
Creates a SimpleTabAdapter with the arguments supplied to this builder.
|
PopTabAdapter.Builder |
setDefaultIconColor(int color)
Sets icon color when a tab is not selected.
|
PopTabAdapter.Builder |
setIconDimension(int dimension)
Sets the dimension of the icon to be displayed.
|
PopTabAdapter.Builder |
setIconFetcher(PopTabAdapter.IconFetcher fetcher)
Sets the callback method to get the icon displayed in tabs
|
PopTabAdapter.Builder |
setPopDuration(int duration)
Sets the pop animation duration
|
PopTabAdapter.Builder |
setTabBackgroundResId(int tabBackgroundResId)
Set the background to a given resource.
|
PopTabAdapter.Builder |
setTabIndicatorColor(int color)
Sets the tab indicator bar color.
|
PopTabAdapter.Builder |
setTabPadding(int tabPaddingStart,
int tabPaddingTop,
int tabPaddingEnd,
int tabPaddingBottom)
Sets the padding.
|
PopTabAdapter.Builder |
setTabTextAppearance(int tabTextAppearance)
Sets the text appearance from the specified style resource.
|
PopTabAdapter.Builder |
setViewPager(ViewPager viewPager)
Set a list of items, which are supplied by the given ViewPager
|
public Builder(Context context)
context - the parent contextpublic PopTabAdapter.Builder setViewPager(ViewPager viewPager)
setViewPager in class com.tompee.funtablayout.BaseAdapter.BaseBuilderviewPager - the ViewPager to link to, or null to clear any previous linkpublic PopTabAdapter.Builder setTabPadding(int tabPaddingStart, int tabPaddingTop, int tabPaddingEnd, int tabPaddingBottom)
setTabPadding in class com.tompee.funtablayout.BaseAdapter.BaseBuildertabPaddingStart - the start padding in pixelstabPaddingTop - the top padding in pixelstabPaddingEnd - the end padding in pixelstabPaddingBottom - the bottom padding in pixelspublic PopTabAdapter.Builder setTabTextAppearance(int tabTextAppearance)
setTabTextAppearance in class com.tompee.funtablayout.BaseAdapter.BaseBuildertabTextAppearance - The resource identifier of the style to apply.public PopTabAdapter.Builder setTabBackgroundResId(int tabBackgroundResId)
setTabBackgroundResId in class com.tompee.funtablayout.BaseAdapter.BaseBuildertabBackgroundResId - The identifier of the resource.public PopTabAdapter.Builder setTabIndicatorColor(int color)
setTabIndicatorColor in class com.tompee.funtablayout.BaseAdapter.BaseBuildercolor - The new indicator colorpublic PopTabAdapter.Builder setIconFetcher(PopTabAdapter.IconFetcher fetcher)
fetcher - The fetcher to setpublic PopTabAdapter.Builder setIconDimension(int dimension)
dimension - Dimension in pixelspublic PopTabAdapter.Builder setDefaultIconColor(int color)
color - New color to setpublic PopTabAdapter.Builder setPopDuration(int duration)
duration - New duration in milliseconds. Default is 500public PopTabAdapter build()