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

Classes

interface  IResetParentLayoutListener
 
enum  ItemType
 
enum  SortType
 

Public Member Functions

View getContentView ()
 
int getId ()
 
int getTag ()
 
String getText ()
 
void onItemLayout (int left, int top, int right, int bottom)
 
void setBackgroundResource (int res)
 
void setContentView (View view)
 
void setDisplayStyle (ItemType type)
 
void setEllipsize (TextUtils.TruncateAt where)
 
void setEnable (boolean enable)
 
void setFilters (InputFilter[] filters)
 
void setId (int id)
 
boolean setImageDrawable (@Nullable Drawable drawable)
 
boolean setImageResource (int res)
 
void setInterval (int interval)
 
void setOnClickListener (View.OnClickListener l)
 
void setOnLongClickListener (View.OnLongClickListener l)
 
void setRelation (int relation)
 
void setResetLayoutListener (IResetParentLayoutListener listener)
 
void setSelected (boolean selected)
 
void setTag (int tag)
 
void setText (CharSequence text)
 
void setText (int res)
 
void setTextColor (int selectedTextColor, int disSelectedTextColor)
 
void setTextColor (int color)
 
void setTextColorResource (int res)
 
void setTextSize (float size)
 
void setTypeface (Typeface typeface)
 

Static Public Attributes

static final int RELATION_BELOW = 13
 
static final int RELATION_LEFT = 10
 
static final int RELATION_RIGNT = 12
 
static final int RELATION_TOP = 11
 

Detailed Description

Set the properties of item in the toolbar

Member Function Documentation

◆ getContentView()

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

Retrieve the View attached to this item, if present.

◆ getId()

int com.foxit.uiextensions.controls.toolbar.IBaseItem.getId ( )

Return the identifier of the item view

◆ getTag()

int com.foxit.uiextensions.controls.toolbar.IBaseItem.getTag ( )

Return the tag of the item.

◆ getText()

String com.foxit.uiextensions.controls.toolbar.IBaseItem.getText ( )

Return the text that TextView is displaying.

◆ onItemLayout()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.onItemLayout ( int  left,
int  top,
int  right,
int  bottom 
)

Called from layout when this item should assign a size and position to each of its children.

Parameters
leftLeft position, relative to parent
topTop position, relative to parent
rightRight position, relative to parent
bottomBottom position, relative to parent

◆ setBackgroundResource()

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

Set the background to a given resource.

Parameters
resThe identifier of the resource.

◆ setContentView()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setContentView ( View  view)

Set the content view attached to this item

◆ setDisplayStyle()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setDisplayStyle ( ItemType  type)

Set the display style of this item view

Parameters
typethe specified ItemType to use.

◆ setEllipsize()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setEllipsize ( TextUtils.TruncateAt  where)

Causes words in the text that are longer than the view's width to be ellipsized instead of broken in the middle.

See also
android.widget.TextView::setEllipsize(TextUtils.TruncateAt)

◆ setEnable()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setEnable ( boolean  enable)

Set the enabled state of this item.

Parameters
enableTrue if this item is enabled, false otherwise.

◆ setFilters()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setFilters ( InputFilter []  filters)

Sets the list of input filters that will be used if the buffer is Editable. Has no effect otherwise.

See also
android.widget.TextView::setFilters(InputFilter[])

◆ setId()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setId ( int  id)

Set the identifier for this item view

Parameters
ida number used to identify the item view

◆ setImageDrawable()

boolean com.foxit.uiextensions.controls.toolbar.IBaseItem.setImageDrawable ( @Nullable Drawable  drawable)

Sets a drawable as the content of this item.

Parameters
drawablethe Drawable to set
Returns
true for success.

◆ setImageResource()

boolean com.foxit.uiextensions.controls.toolbar.IBaseItem.setImageResource ( int  res)

Sets a drawable as the content of this item.

Parameters
resthe resource identifier of the drawable
Returns
true for success.

◆ setInterval()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setInterval ( int  interval)

The interval in pixels of the item.

Parameters
intervalthe interval size.

◆ setOnClickListener()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setOnClickListener ( View.OnClickListener  l)

Register a callback to be invoked when this item is clicked.

Parameters
lThe callback that will run

◆ setOnLongClickListener()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setOnLongClickListener ( View.OnLongClickListener  l)

Register a callback to be invoked when this view is clicked and held.

Parameters
lThe callback that will run

◆ setRelation()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setRelation ( int  relation)

Sets the relation between text view and image view for this item. NOTE: Only used for ItemType#Item_Text_Image.

Parameters
relationthe relation between text view and image view. Should be one of RELATION_LEFT, RELATION_TOP, RELATION_RIGNT or RELATION_BELOW

◆ setResetLayoutListener()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setResetLayoutListener ( IResetParentLayoutListener  listener)

Set a IResetParentLayoutListener to be invoke when the layout has reset.

Parameters
listenerthe callback that will run.

◆ setSelected()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setSelected ( boolean  selected)

Changes the selection state of this item.

Parameters
selectedtrue if the item must be selected, false otherwise

◆ setTag()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setTag ( int  tag)

Set the tag for this item.

Parameters
taga number used to identify the item

◆ setText() [1/2]

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setText ( CharSequence  text)

Sets the text to be displayed.

Parameters
texttext to be displayed

◆ setText() [2/2]

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setText ( int  res)

Sets the text to be displayed using a string resource identifier.

Parameters
resthe resource identifier of the string resource to be displayed

◆ setTextColor() [1/2]

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setTextColor ( int  selectedTextColor,
int  disSelectedTextColor 
)

Sets the text color for all the states (normal, selected, focused) to be this color.

Parameters
selectedTextColorA color value in the form 0xAARRGGBB. used when text is selected
disSelectedTextColorA color value in the form 0xAARRGGBB. used when text is normal state.

◆ setTextColor() [2/2]

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setTextColor ( int  color)

Sets the text color for all the states (normal, selected, focused) to be this color.

Parameters
colorA color value in the form 0xAARRGGBB.

◆ setTextColorResource()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setTextColorResource ( int  res)

Sets the text color from a color state list associated with a particular resource ID.

Parameters
resa color state list associated with a particular resource ID

◆ setTextSize()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setTextSize ( float  size)

Set the text size

Parameters
sizeThe desired size

◆ setTypeface()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setTypeface ( Typeface  typeface)

Sets the typeface and style in which the text should be displayed.

Parameters
typefacethe Typeface to use.

Member Data Documentation

◆ RELATION_BELOW

final int com.foxit.uiextensions.controls.toolbar.IBaseItem.RELATION_BELOW = 13
static

Used for ItemType#Item_Text_Image: the text view is blow of the image. Note: This method is only used within RDK

◆ RELATION_LEFT

final int com.foxit.uiextensions.controls.toolbar.IBaseItem.RELATION_LEFT = 10
static

Used for ItemType#Item_Text_Image: the text view is on the left of the image. Note: This method is only used within RDK

◆ RELATION_RIGNT

final int com.foxit.uiextensions.controls.toolbar.IBaseItem.RELATION_RIGNT = 12
static

Used for ItemType#Item_Text_Image: the text view is on the right of the image. Note: This method is only used within RDK

◆ RELATION_TOP

final int com.foxit.uiextensions.controls.toolbar.IBaseItem.RELATION_TOP = 11
static

Used for ItemType#Item_Text_Image: the text view is on the top of the image. Note: This method is only used within RDK