Classes | |
enum | BarName |
interface | IItemClickListener |
Public Member Functions | |
boolean | addCustomToolBar (BarName barName, View view) |
boolean | addItem (BarName barName, BaseBar.TB_Position gravity, IBaseItem item, int index) |
boolean | addItem (BarName barName, BaseBar.TB_Position gravity, CharSequence text, int index, IItemClickListener clickListener) |
boolean | addItem (BarName barName, BaseBar.TB_Position gravity, Drawable drawable, int index, IItemClickListener clickListener) |
boolean | addItem (BarName barName, BaseBar.TB_Position gravity, int textId, int resId, int index, IItemClickListener clickListener) |
void | enableToolBar (BarName barName, boolean enabled) |
IBaseItem | getItem (BarName barName, BaseBar.TB_Position gravity, int tag) |
IBaseItem | getItemByIndex (BarName barName, BaseBar.TB_Position gravity, int index) |
int | getItemsCount (BarName barName, BaseBar.TB_Position gravity) |
int | getItemVisibility (BarName barName, BaseBar.TB_Position gravity, int index) |
int | getVisibility (BarName barName, BaseBar.TB_Position gravity, int tag) |
void | removeAllItems (BarName barName) |
boolean | removeItem (BarName barName, BaseBar.TB_Position gravity, int index) |
boolean | removeItem (BarName barName, BaseBar.TB_Position gravity, IBaseItem item) |
boolean | removeToolBar (BarName barName) |
void | setBackgroundColor (BarName barName, int color) |
void | setBackgroundResource (BarName barName, int resid) |
void | setItemVisibility (BarName barName, BaseBar.TB_Position gravity, int index, int visibility) |
void | setVisibility (BarName barName, BaseBar.TB_Position gravity, int tag, int visibility) |
Toolbar's Operation control class,you can use it show/hide/add/remove items on the toolbar . (PS:Currently toolbar has only the topbar/bottombar on the main page )
you can use it through com.foxit.uiextensions.UIExtensionsManager#getBarManager()
boolean com.foxit.uiextensions.controls.toolbar.IBarsHandler.addCustomToolBar | ( | BarName | barName, |
View | view | ||
) |
add custom toolbar by BarName
barName | the toolbar name |
view | the custom view |
boolean com.foxit.uiextensions.controls.toolbar.IBarsHandler.addItem | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
IBaseItem | item, | ||
int | index | ||
) |
Add an custom item to the toolbar
Inserts the specified IBaseItem at the specified position in the toolbar. Shifts the IBaseItem currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Note 1: if you want addItem in the topbar ,the gravity should be BaseBar.TB_Position#Position_LT orBaseBar.TB_Position#Position_RB; if you want addItem in the bottombar,the gravity should be BaseBar.TB_Position#Position_CENTER,Otherwise it may they overlap.
Note 2: If your item has set the tag IBaseItem#setTag(int),the tag must be unique and the tag must be less than 100, or more than 300, because the tag between 100 and 300 has been used or may be used in the futureToolbarItemConfig.
Note 3: the maximum number of items on the toolbar is 7,if the items counts more than 7,more than part will not be displayed and reture false
barName | the toolbar name |
gravity | the location of item in the toolbarBaseBar.TB_Position |
item | If you want to add item in topbar, you can use BaseItemImpl or if want to add item in bottombar, you can useCircleItemImpl |
index | the position at which to add the item,starting from 0 ,less than or equal togetItemsCount(BarName, BaseBar.TB_Position) and is relative to BaseBar.TB_Position. |
IndexOutOfBoundsException | if the index is out of range (index < 0 || index > getItemsCount() ) |
boolean com.foxit.uiextensions.controls.toolbar.IBarsHandler.addItem | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
CharSequence | text, | ||
int | index, | ||
IItemClickListener | clickListener | ||
) |
Add a default text-only item
Inserts the specified IBaseItem at the specified position in the toolbar. Shifts the IBaseItem currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Note 1: if you want addItem in the topbar ,the gravity should be BaseBar.TB_Position#Position_LT orBaseBar.TB_Position#Position_RB; if you want addItem in the bottombar,the gravity should be BaseBar.TB_Position#Position_CENTER,Otherwise it may they overlap.
Note 2: the maximum number of items on the toolbar is 7,if the items counts more than 7,more than part will not be displayed and reture false
barName | the toolbar name |
gravity | the location of item in the toolbarBaseBar.TB_Position |
text | text to be displayed |
index | the position at which to add the item,starting from 0 ,less than or equal togetItemsCount(BarName, BaseBar.TB_Position) and is relative to BaseBar.TB_Position. |
clickListener | The callback that will run |
IndexOutOfBoundsException | if the index is out of range (index < 0 || index > getItemsCount() ) |
boolean com.foxit.uiextensions.controls.toolbar.IBarsHandler.addItem | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
Drawable | drawable, | ||
int | index, | ||
IItemClickListener | clickListener | ||
) |
Add a default image-only item
Inserts the specified IBaseItem at the specified position in the toolbar. Shifts the IBaseItem currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Note 1: if you want addItem in the topbar ,the gravity should be BaseBar.TB_Position#Position_LT orBaseBar.TB_Position#Position_RB; if you want addItem in the bottombar,the gravity should be BaseBar.TB_Position#Position_CENTER,Otherwise it may they overlap.
Note 2: the maximum number of items on the toolbar is 7,if the items counts more than 7,more than part will not be displayed and reture false
barName | the toolbar name |
gravity | the location of item in the toolbarBaseBar.TB_Position |
drawable | the Drawable to set, or null |
index | the position at which to add the item,starting from 0 ,less than or equal togetItemsCount(BarName, BaseBar.TB_Position) and is relative to BaseBar.TB_Position. |
clickListener | The callback that will run |
IndexOutOfBoundsException | if the index is out of range (index < 0 || index > getItemsCount() ) |
boolean com.foxit.uiextensions.controls.toolbar.IBarsHandler.addItem | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
int | textId, | ||
int | resId, | ||
int | index, | ||
IItemClickListener | clickListener | ||
) |
Add a default item to the toolbar
Inserts the specified IBaseItem at the specified position in the toolbar. Shifts the IBaseItem currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Note 1: if you want addItem in the topbar ,the gravity should be BaseBar.TB_Position#Position_LT orBaseBar.TB_Position#Position_RB; if you want addItem in the bottombar,the gravity should be BaseBar.TB_Position#Position_CENTER,Otherwise it may they overlap.
Note 2: the maximum number of items on the toolbar is 7,if the items counts more than 7,more than part will not be displayed and reture false
barName | the toolbar name |
gravity | the location of item in the toolbarBaseBar.TB_Position |
textId | the resource identifier of the string resource to be displayed |
resId | the resource identifier of the drawable |
index | the position at which to add the item,starting from 0 ,less than or equal togetItemsCount(BarName, BaseBar.TB_Position) and is relative to BaseBar.TB_Position. |
clickListener | The callback that will run |
IndexOutOfBoundsException | if the index is out of range (index < 0 || index > getItemsCount() ) |
void com.foxit.uiextensions.controls.toolbar.IBarsHandler.enableToolBar | ( | BarName | barName, |
boolean | enabled | ||
) |
Set the enabled state of this view,and if set the enable to true, the bar is visible, or if set the enable to false,the bar is hide.
barName | the toolbar name |
enabled | True if this view is visible, false otherwise. |
IBaseItem com.foxit.uiextensions.controls.toolbar.IBarsHandler.getItem | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
int | tag | ||
) |
Get the item by tag, if tag does not exist, it return null
barName | the toolbar name |
gravity | the location of item in the toolbarBaseBar.TB_Position |
tag | the item id and is unique ,it may be the existing tag
|
IBaseItem com.foxit.uiextensions.controls.toolbar.IBarsHandler.getItemByIndex | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
int | index | ||
) |
Get the item by index
barName | the toolbar name |
gravity | the location of item in the toolbarBaseBar.TB_Position |
index | the index of the IBaseItem and is relative to BaseBar.TB_Position. |
IndexOutOfBoundsException | if the index is out of range (index < 0 || index > getItemsCount() ) |
int com.foxit.uiextensions.controls.toolbar.IBarsHandler.getItemsCount | ( | BarName | barName, |
BaseBar.TB_Position | gravity | ||
) |
get the items count by BarName and BaseBar.TB_Position
barName | the toolbar name |
gravity | the location of item in the toolbarBaseBar.TB_Position |
int com.foxit.uiextensions.controls.toolbar.IBarsHandler.getItemVisibility | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
int | index | ||
) |
Returns the visibility status for this view.
barName | the toolbar name IBarsHandler.BarName |
gravity | the location of item in the toolbarBaseBar.TB_Position |
index | the index of the IBaseItem and is relative to BaseBar.TB_Position. |
IndexOutOfBoundsException | if the index is out of range (index < 0 || index > getItemsCount() ) |
int com.foxit.uiextensions.controls.toolbar.IBarsHandler.getVisibility | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
int | tag | ||
) |
Returns the visibility status for this view.If this toolbar does not contain the tag, it will not work.
barName | the toolbar name IBarsHandler.BarName |
gravity | the location of item in the toolbarBaseBar.TB_Position |
tag | the item id and is unique ,it may be the existing tag
|
void com.foxit.uiextensions.controls.toolbar.IBarsHandler.removeAllItems | ( | BarName | barName | ) |
Removes all items from the toolbar
barName | the toolbar name |
boolean com.foxit.uiextensions.controls.toolbar.IBarsHandler.removeItem | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
int | index | ||
) |
Removes the IBaseItem at the specified position in this toolbar Shifts any subsequent elements to the left (subtracts one from their indices).
barName | the toolbar name |
gravity | the location of item in the toolbarBaseBar.TB_Position |
index | the index of the IBaseItem and is relative to BaseBar.TB_Position. |
IndexOutOfBoundsException | if the index is out of range (index < 0 || index > getItemsCount() ) |
boolean com.foxit.uiextensions.controls.toolbar.IBarsHandler.removeItem | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
IBaseItem | item | ||
) |
Removes the IBaseItem in this toolbar,if it is present.If this toolbar does not contain the IBaseItem, it is unchanged.
barName | the toolbar name |
gravity | the location of item in the toolbarBaseBar.TB_Position |
item | the specified item in the toolbar |
boolean com.foxit.uiextensions.controls.toolbar.IBarsHandler.removeToolBar | ( | BarName | barName | ) |
remove toolbar by BarName
barName | the toolbar name |
void com.foxit.uiextensions.controls.toolbar.IBarsHandler.setBackgroundColor | ( | BarName | barName, |
int | color | ||
) |
Sets the background color for the toolbar.
barName | the toolbar name |
color | the color of the background |
void com.foxit.uiextensions.controls.toolbar.IBarsHandler.setBackgroundResource | ( | BarName | barName, |
int | resid | ||
) |
Set the background to a given resource. The resource should refer to a Drawable object or 0 to remove the background.
barName | the toolbar name |
resid | The identifier of the resource. |
void com.foxit.uiextensions.controls.toolbar.IBarsHandler.setItemVisibility | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
int | index, | ||
int | visibility | ||
) |
Set the enabled state of this item view.
barName | the toolbar name IBarsHandler.BarName |
gravity | the location of item in the toolbarBaseBar.TB_Position |
index | the index of the IBaseItem and is relative to BaseBar.TB_Position. |
visibility | One of View#VISIBLE, View#INVISIBLE, or View#GONE. |
IndexOutOfBoundsException | if the index is out of range (index < 0 || index > getItemsCount() ) |
void com.foxit.uiextensions.controls.toolbar.IBarsHandler.setVisibility | ( | BarName | barName, |
BaseBar.TB_Position | gravity, | ||
int | tag, | ||
int | visibility | ||
) |
Set the enabled state of this view. If this toolbar does not contain the tag, it will not work.
barName | the toolbar name IBarsHandler.BarName |
gravity | the location of item in the toolbarBaseBar.TB_Position |
tag | the item id and is unique ,it may be the existing tag
|
visibility | One of View#VISIBLE, View#INVISIBLE, or View#GONE. |