java.lang.Object | |
↳ | com.neomades.app.TabSpec |
A TabScreen
's tab specification. This enables to define separately
for each tab its screen , default TabBar
item text, default
TabBar
item image and parameters to pass to the screen. Note
that it is equal as using
addTab(int, int, Class, ScreenParams)
if the characteristic
of the tab are only these parameters.
TabSpec can be used to customize the selected aspect of the
TabBar
item associated to the tab. Thus, the image of the tab
can change when selected if setSelectedImage(Image)
is
defined. In the same way, the selected background image of the tab can be
modified using setSelectedBackgroundImage(Image)
.
In iOS, the selected image and selected background image are ignored by
default. To make it visible, a CustomTabBar
must be linked with the
TabScreen
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | SYSTEM_TAB_BOOKMARKS | The iOS bookmarks system item. | |||||||||
int | SYSTEM_TAB_CONTACTS | The iOS contacts system item. | |||||||||
int | SYSTEM_TAB_DOWNLOADS | The iOS downloads system item. | |||||||||
int | SYSTEM_TAB_FAVORITES | The iOS favorites system item. | |||||||||
int | SYSTEM_TAB_FEATURED | The iOS featured system item. | |||||||||
int | SYSTEM_TAB_HISTORY | The iOS history system item. | |||||||||
int | SYSTEM_TAB_MORE | The iOS more system item. | |||||||||
int | SYSTEM_TAB_MOSTRECENT | The iOS most recent system item. | |||||||||
int | SYSTEM_TAB_MOSTVIEWED | The iOS most viewed system item. | |||||||||
int | SYSTEM_TAB_RECENTS | The iOS recents system item. | |||||||||
int | SYSTEM_TAB_SEARCH | The iOS search system item. | |||||||||
int | SYSTEM_TAB_TOPRATED | The iOS top rated system item. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static TabSpec |
newTabSpec(Class screen)
Create a new TabSpec instance with the screen linked to the tab.
| ||||||||||
TabSpec |
setImage(Image image)
Sets the image of the tab that will be displayed in the
TabBar . | ||||||||||
TabSpec |
setImage(int imageResId)
Sets the image of the tab that will be displayed in the
TabBar . | ||||||||||
TabSpec |
setParams(ScreenParams params)
Sets the additional information given to the pushed screen.
| ||||||||||
TabSpec |
setSelectedBackgroundImage(int imageResId)
Sets the selected background image of the tab that will be displayed when the
tab is selected.
| ||||||||||
TabSpec |
setSelectedBackgroundImage(Image image)
Sets the selected background image of the tab that will be displayed when the
tab is selected.
| ||||||||||
TabSpec |
setSelectedImage(int imageResId)
Sets the image of the tab that will be displayed in the
TabBar
when the tab is selected. | ||||||||||
TabSpec |
setSelectedImage(Image image)
Sets the image of the tab that will be displayed in the
TabBar
when the tab is selected. | ||||||||||
TabSpec |
setSelectedView(Layout view)
Set the view of the tab that will be displayed in the tab is selected.
| ||||||||||
TabSpec | setSystemTab(int systemTab) | ||||||||||
TabSpec |
setText(String text)
Set the string for the title of the tab.
| ||||||||||
TabSpec |
setText(int textResId)
Set the string for the title of the tab.
| ||||||||||
TabSpec |
setView(Layout view)
Set the view of the tab that will be displayed in the
TabBar . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
The iOS bookmarks system item.
The iOS contacts system item.
The iOS downloads system item.
The iOS favorites system item.
The iOS featured system item.
The iOS history system item.
The iOS more system item.
The iOS most recent system item.
The iOS most viewed system item.
The iOS recents system item.
The iOS search system item.
The iOS top rated system item.
Create a new TabSpec instance with the screen linked to the tab.
screen | the content screen of the tab. |
---|
Sets the image of the tab that will be displayed in the TabBar
.
image | the image of the tab that will be displayed in the
TabBar . |
---|
Sets the image of the tab that will be displayed in the TabBar
.
imageResId | the image id of the tab that will be displayed in the
TabBar . |
---|
Sets the additional information given to the pushed screen.
params | additional information |
---|
Sets the selected background image of the tab that will be displayed when the
tab is selected. This image will be displayed behind the title and the image
of the tab but above the TabBar
. This property can be defined
for all the items of the TabBar
using
setSelectedItemBackgroundImage(Image)
. Note that the
background image defined using
setSelectedItemBackgroundImage(Image)
will be ignored if
a selected background image was declared in the TabSpec.
Cross-Platform consideration
In iOS, this method is ignored if the TabScreen
does not use a CustomTabBar
.
imageResId | the selected background image id of the tab that will be displayed when the tab is selected. |
---|
Sets the selected background image of the tab that will be displayed when the
tab is selected. This image will be displayed behind the title and the image
of the tab but above the TabBar
. This property can be defined
for all the items of the TabBar
using
setSelectedItemBackgroundImage(Image)
. Note that the
background image defined using
setSelectedItemBackgroundImage(Image)
will be ignore if
a selected background image was declared in the TabSpec.
Cross-Platform consideration
In iOS, this method is ignored if the TabScreen
does not use a CustomTabBar
.
image | the selected background image of the tab that will be displayed when the tab is selected. |
---|
Sets the image of the tab that will be displayed in the TabBar
when the tab is selected. This image will replace the image set using
setImage(Image)
when the tab is selected.
Cross-Platform consideration
In iOS, this method is ignored if the TabScreen
does not use a
CustomTabBar
.
imageResId | the selected image id of the tab that will be displayed when the tab is selected |
---|
Sets the image of the tab that will be displayed in the TabBar
when the tab is selected. This image will replace the image set using
setImage(Image)
when the tab is selected.
Cross-Platform consideration
In iOS, this method is ignored if the TabScreen
does not use a
CustomTabBar
.
image | the selected image of the tab that will be displayed when the tab is selected |
---|
Set the view of the tab that will be displayed in the tab is selected.
This method must be used with setSelectedView(Layout)
.
Using this method will cancel configuration with setImage(Image)
,
setSelectedImage(Image)
, setSelectedBackgroundImage(Image)
or setText(String)
methods for this tab.
Be sure that your layout can enter in the tab area.
view | the view of the tab of the tab that will be displayed when the tab is selected |
---|
Set the string for the title of the tab. It will be displayed in the
TabBar
.
text | the string for the title of the tab. |
---|
Set the string for the title of the tab. It will be displayed in the
TabBar
.
textResId | the string id of the title of the tab. |
---|
Set the view of the tab that will be displayed in the TabBar
.
Using this method will cancel configuration with setImage(Image)
,
setSelectedImage(Image)
, setSelectedBackgroundImage(Image)
or setText(String)
methods for this tab.
Be sure that your layout can enter in the tab area.
Use setSelectedView(Layout)
to configure the tab in the selected
state.
view | the view of the tab that will be displayed in the
TabBar . |
---|