com.foxit.uiextensions.controls.toolbar.BaseBar Interface Reference

Classes

enum  TB_Position
 

Public Member Functions

boolean addView (IBaseItem item, TB_Position position)
 
boolean addView (IBaseItem item, TB_Position position, int index)
 
View getContentView ()
 
IBaseItem getItem (TB_Position location, int tag)
 
IBaseItem getItemByIndex (TB_Position location, int index)
 
int getItemsCount (TB_Position location)
 
int getItemVisibility (TB_Position location, int tag)
 
int getItemVisibilityByIndex (TB_Position location, int index)
 
void removeAllItems ()
 
boolean removeItemByIndex (TB_Position position, int index)
 
boolean removeItemByItem (IBaseItem item)
 
boolean removeItemByTag (int tag)
 
void setBackgroundColor (int color)
 
void setBackgroundResource (int res)
 
void setBarVisible (boolean visible)
 
void setContentView (View v)
 
void setHeight (int height)
 
void setInterceptTouch (boolean isInterceptTouch)
 
void setInterval (boolean interval)
 
void setItemSpace (int space)
 
void setItemVisibility (TB_Position location, int tag, int visibility)
 
void setItemVisibilityByIndex (TB_Position location, int index, int visibility)
 
void setNeedResetItemSize (boolean needResetItemSize)
 
void setOrientation (int orientation)
 
void setWidth (int width)
 
void updateLayout ()
 

Static Public Attributes

static final int HORIZONTAL = 0
 
static final int VERTICAL = 1
 

Detailed Description

Interface that defines information about bar.

Member Function Documentation

◆ addView() [1/2]

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.addView ( IBaseItem  item,
TB_Position  position 
)

Adds a item.

Parameters
itemThe item to add.
positionThe TB_Position to add the item.
Returns
true
if success,
false
otherwise.

◆ addView() [2/2]

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.addView ( IBaseItem  item,
TB_Position  position,
int  index 
)

Adds a item.

Parameters
itemThe item to add.
positionThe TB_Position to add the item.
indexThe position at which to add the item.
Returns
true
if success,
false
otherwise.

◆ getContentView()

View com.foxit.uiextensions.controls.toolbar.BaseBar.getContentView ( )

Retrieve the View attached to this bar, if present.

Returns
The View attached to the bar or null if no View is present.

◆ getItem()

IBaseItem com.foxit.uiextensions.controls.toolbar.BaseBar.getItem ( TB_Position  location,
int  tag 
)

Get a item.

Parameters
locationThe TB_Position to get the item.
tagThe tag to get the item.
Returns
The item at the specified layout direction and tag.

◆ getItemByIndex()

IBaseItem com.foxit.uiextensions.controls.toolbar.BaseBar.getItemByIndex ( TB_Position  location,
int  index 
)

Get a item at the specified position in the bar.

Parameters
locationThe TB_Position to get the item.
indexThe position at which to get the bar
Returns
The item at the specified layout direction and position.

◆ getItemsCount()

int com.foxit.uiextensions.controls.toolbar.BaseBar.getItemsCount ( TB_Position  location)

Returns the number of item in the bar at the specified layout direction.

Parameters
locationThe TB_Position to get the the number of item.
Returns
The number of item in the bar

◆ getItemVisibility()

int com.foxit.uiextensions.controls.toolbar.BaseBar.getItemVisibility ( TB_Position  location,
int  tag 
)

Returns the visibility status for this item.

Parameters
locationThe TB_Position to get the item visibility.
tagThe tag to get the item visibility.
Returns
-1
while the item can`t be found, or should be one of View#VISIBLE, View#INVISIBLE, or View#GONE.

◆ getItemVisibilityByIndex()

int com.foxit.uiextensions.controls.toolbar.BaseBar.getItemVisibilityByIndex ( TB_Position  location,
int  index 
)

Returns the visibility status for this item.

Parameters
locationThe TB_Position to get the item visibility.
indexThe position at which to get the bar visibility.
Returns
-1
while the item can`t be found, or should be one of View#VISIBLE, View#INVISIBLE, or View#GONE.

◆ removeAllItems()

void com.foxit.uiextensions.controls.toolbar.BaseBar.removeAllItems ( )

Remove all items of the bar.

◆ removeItemByIndex()

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.removeItemByIndex ( TB_Position  position,
int  index 
)

Removes a item by the specified index.

Parameters
positionThe TB_Position to remove the item.
indexThe position at which to remove the item.
Returns
true
if success,
false
otherwise.

◆ removeItemByItem()

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.removeItemByItem ( IBaseItem  item)

Removes the specified item.

Parameters
itemThe item to remove.
Returns
true
if success,
false
otherwise.

◆ removeItemByTag()

boolean com.foxit.uiextensions.controls.toolbar.BaseBar.removeItemByTag ( int  tag)

Removes a item by the specified tag.

Parameters
tagThe tag to remove the item.
Returns
true
if success,
false
otherwise.

◆ setBackgroundColor()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setBackgroundColor ( int  color)

Sets the background color for this bar.

Parameters
colorthe color of the background

◆ setBackgroundResource()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setBackgroundResource ( int  res)

Set the background to a given resource. The resource should refer to a Drawable object or 0 to remove the background.

Parameters
resThe identifier of the resource.

◆ setBarVisible()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setBarVisible ( boolean  visible)

Set the visibility state of this bar.

Parameters
visible

◆ setContentView()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setContentView ( View  v)

Sets the View attached to this bar

Parameters
vThe View to set.

◆ setHeight()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setHeight ( int  height)

Sets the height of the bar.

Parameters
heighthow tall the bar wants to be.

◆ setInterceptTouch()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setInterceptTouch ( boolean  isInterceptTouch)

Whether intercepts the touch event.

Parameters
isInterceptTouch

◆ setInterval()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setInterval ( boolean  interval)

Whether uses interval between items for the center direction layout bar. Only for TB_Position#Position_CENTER.

Note: This method is only used within RDK

Parameters
interval

◆ setItemSpace()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setItemSpace ( int  space)

Set space between the items. Must use it after setOrientation(int).

Parameters
spaceThe space between the items.

◆ setItemVisibility()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setItemVisibility ( TB_Position  location,
int  tag,
int  visibility 
)

Set the visibility state of this item.

Parameters
locationThe TB_Position to set the item visibility.
tagThe tag to set the item visibility.
visibilityshould be one of View#VISIBLE, View#INVISIBLE, or View#GONE.

◆ setItemVisibilityByIndex()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setItemVisibilityByIndex ( TB_Position  location,
int  index,
int  visibility 
)

Set the visibility state of this item by the specified index.

Parameters
locationThe TB_Position to set the item visibility.
indexThe position at which to set the bar visibility.
visibilityshould be one of View#VISIBLE, View#INVISIBLE, or View#GONE.

◆ setNeedResetItemSize()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setNeedResetItemSize ( boolean  needResetItemSize)

Whether reset the size of the item in the bar.

Parameters
needResetItemSize

◆ setOrientation()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setOrientation ( int  orientation)

Sets a layout direction of this bar view.

Parameters
orientationshould one of HORIZONTAL or VERTICAL.

◆ setWidth()

void com.foxit.uiextensions.controls.toolbar.BaseBar.setWidth ( int  width)

Sets the width of the bar.

Parameters
widthhow wide the view wants to be.

◆ updateLayout()

void com.foxit.uiextensions.controls.toolbar.BaseBar.updateLayout ( )

Update the layout of the toolbar

Member Data Documentation

◆ HORIZONTAL

final int com.foxit.uiextensions.controls.toolbar.BaseBar.HORIZONTAL = 0
static

Horizontal layout direction of this bar.

◆ VERTICAL

final int com.foxit.uiextensions.controls.toolbar.BaseBar.VERTICAL = 1
static

Vertical layout direction of this bar.