public class Tab
extends java.lang.Object
implements android.view.View.OnClickListener
| Constructor and Description |
|---|
Tab(FragmentActivity activity,
int tabViewId,
int tabLayoutId)
Base constructor.
|
Tab(FragmentActivity activity,
TabBody tabBody,
TabLayout tabLayout)
Base constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Tab |
addTab(Fragment fragment)
A Factory pattern method to create a
Tab |
Tab |
addTab(Fragment fragment,
int position)
A Factory pattern method to create a
Tab |
Tab |
addTab(Fragment fragment,
java.lang.String title)
A Factory pattern method to create a
Tab |
Tab |
addTab(Fragment fragment,
java.lang.String title,
android.graphics.drawable.Drawable drawable)
A Factory pattern method to create a
Tab |
Tab |
addTab(Fragment fragment,
java.lang.String title,
android.graphics.drawable.Drawable drawable,
int position)
A Factory pattern method to create a
Tab |
Tab |
addTab(Fragment fragment,
java.lang.String title,
int position)
A Factory pattern method to create a
Tab |
Tab |
addTab(TabFragment tabFragment)
The base addTab method.
|
Tab |
addTab(TabFragment tabFragment,
int position)
The base addTab method.
|
static Tab |
createTab(FragmentActivity activity,
int tabViewId,
int tabLayoutId)
A Factory pattern method to create a
Tab |
TabBody |
getTabBody()
Getter for the
TabBody |
TabLayout |
getTabLayout()
Getter for the
TabLayout |
void |
onClick(android.view.View view) |
void |
setTabBody(TabBody tabBody)
Setter for the
TabBody |
void |
setTabLayout(TabLayout tabLayout)
Setter for the
TabLayout |
public Tab(FragmentActivity activity,
int tabViewId,
int tabLayoutId)
activity - , must extends FragmentActivitytabViewId - , the view id of the TabBodytabLayoutId - , the view id of the TabLayoutpublic static Tab createTab(FragmentActivity activity, int tabViewId, int tabLayoutId)
Tabactivity - tabViewId - tabLayoutId - Tab object.public TabLayout getTabLayout()
TabLayoutpublic void setTabLayout(TabLayout tabLayout)
TabLayoutpublic Tab addTab(TabFragment tabFragment)
TabtabFragment - , the TabFragment that will be added.public Tab addTab(TabFragment tabFragment, int position)
TabtabFragment - , the TabFragment that will be added.position - , the position to add the TabFragment, -1 will be add to the endpublic Tab addTab(Fragment fragment)
Tabfragment - , the Fragment that will be added. The title will be the Class.getSimpleName()public Tab addTab(Fragment fragment, java.lang.String title)
Tabfragment - , the Fragment that will be added.title - , the title that will be added.public Tab addTab(Fragment fragment, java.lang.String title, android.graphics.drawable.Drawable drawable)
Tabfragment - , the Fragment that will be added.title - , the title that will be added.drawable - , the Drawable that will be added to the top of the titlepublic Tab addTab(Fragment fragment, int position)
Tabfragment - , the Fragment that will be added. The title will be the Class.getSimpleName()position - , the position to add the TabFragment, -1 will be add to the endpublic Tab addTab(Fragment fragment, java.lang.String title, int position)
Tabfragment - , the Fragment that will be added.title - , the title that will be added.position - , the position to add the TabFragment, -1 will be add to the endpublic Tab addTab(Fragment fragment, java.lang.String title, android.graphics.drawable.Drawable drawable, int position)
Tabfragment - , the Fragment that will be added.title - , the title that will be added.drawable - , the Drawable that will be added to the top of the titleposition - , the position to add the TabFragment, -1 will be add to the endpublic void onClick(android.view.View view)
onClick in interface android.view.View.OnClickListener