public class

CustomTabBar

extends Object
java.lang.Object
   ↳ com.neomades.app.CustomTabBar

Class Overview

Create a custom TabBar to replace the default system TabBar in TabScreen.

This class is useful to change the look and fill of a TabBar and of its items (background, title, font...).
Note that only one kind of background can be defined at the same time (color, image or background) for the TabBar or for a selected item.

See Also

Summary

Public Constructors
CustomTabBar()
Public Methods
void setBackground(int resBackgroundid)
Set a Background as background of the TabBar.
void setBackground(Background background)
Set a Background as background of the TabBar.
void setBackgroundColor(Color color)
Set a uniform color as background of the TabBar.
void setBackgroundImage(int resImageId)
Set an image as the TabBar background.
void setBackgroundImage(Image image)
Set an image as background of the TabBar.
void setItemMoreImage(Image moreImage)
Registers the image to display in the More tab.
void setItemMoreText(String moreText)
Registers the text to display in the More tab.
void setItemsFont(Font font)
The font of the tab item titles.
void setItemsTextColor(Color textColor)
The color of the tab item titles.
void setSelectedItemBackground(int backgroundResId)
The Background of a TabBar item when selected.
void setSelectedItemBackground(Background background)
The Background of a TabBar item when selected.
void setSelectedItemBackgroundColor(Color color)
The background color of a TabBar item when selected.
void setSelectedItemBackgroundImage(Image image)
The background image of a TabBar item when selected.
void setSelectedItemBackgroundImage(int imageResId)
The background image of a TabBar item when selected.
void setSelectedItemFont(Font font)
The font of the tab item title when selected
void setSelectedItemTextColor(Color color)
The color of the tab item title when selected.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CustomTabBar ()

Public Methods

public void setBackground (int resBackgroundid)

Set a Background as background of the TabBar.

Parameters
resBackgroundid the id of the background of the TabBar

public void setBackground (Background background)

Set a Background as background of the TabBar.

Parameters
background the background of the TabBar
See Also

public void setBackgroundColor (Color color)

Set a uniform color as background of the TabBar.

Parameters
color the background color of the TabBar
See Also

public void setBackgroundImage (int resImageId)

Set an image as the TabBar background. If the image does not have the size of the TabBar, it will be repeated along the TabBar width and height.

Parameters
resImageId the id of the background image of the TabBar

public void setBackgroundImage (Image image)

Set an image as background of the TabBar. If the image does not have the size of the TabBar, it will be repeated along the TabBar width and height.

Parameters
image the background image of the TabBar
See Also

public void setItemMoreImage (Image moreImage)

Registers the image to display in the More tab.

Parameters
moreImage the image to be displayed
See Also

public void setItemMoreText (String moreText)

Registers the text to display in the More tab.

Parameters
moreText the text to display

public void setItemsFont (Font font)

The font of the tab item titles.

Parameters
font the font of the tab item titles.
See Also

public void setItemsTextColor (Color textColor)

The color of the tab item titles.

Parameters
textColor the color of the tab item titles.
See Also

public void setSelectedItemBackground (int backgroundResId)

The Background of a TabBar item when selected. The Background will be applied around the item that is selected in the TabBar.

Parameters
backgroundResId the id of the background of a selected item.

public void setSelectedItemBackground (Background background)

The Background of a TabBar item when selected. The Background will be applied around the item that is selected in the TabBar.

Parameters
background the background of a selected item.
See Also

public void setSelectedItemBackgroundColor (Color color)

The background color of a TabBar item when selected. The color will be applied around the item that is selected in the TabBar. Note that the color is defined for all the items in the TabBar.

Parameters
color the background color of a selected item.
See Also

public void setSelectedItemBackgroundImage (Image image)

The background image of a TabBar item when selected. The image will be applied around the item that is selected in the TabBar. If the image does not have the size of the tab item, it will be stretched to take all the space of the item. If a selected background image was already defined for a specific tab using setSelectedBackgroundImage(Image), the image set with this method of CustomTabBar will be ignored for this tab.

Parameters
image the background image of a selected item.
See Also

public void setSelectedItemBackgroundImage (int imageResId)

The background image of a TabBar item when selected. The image will be applied around the item that is selected in the TabBar. If the image does not have the size of the tab item, it will be stretched to take all the space of the item. If a selected background image was already defined for a specific tab using setSelectedBackgroundImage(Image), the image set with this method of CustomTabBar will be ignored for this tab.

Parameters
imageResId the id of the background image of a selected item.

public void setSelectedItemFont (Font font)

The font of the tab item title when selected

Parameters
font the font of the tab item title when selected
See Also

public void setSelectedItemTextColor (Color color)

The color of the tab item title when selected.

Parameters
color the color of the tab item title when selected.
See Also