Foxit PDF SDK  9.1
com.foxit.uiextensions.controls.toolbar.IBaseItem Interface Reference

Classes

enum  ItemType
 
interface  OnItemClickListener
 
interface  OnItemLongPressListener
 
enum  SortType
 

Public Member Functions

View getContentView ()
 
TextView getTextView ()
 
void setText (CharSequence text)
 
void setText (int res)
 
String getText ()
 
void setTextColor (int selectedTextColor, int disSelectedTextColor)
 
void setTextColor (int color)
 
void setTypeface (Typeface typeface)
 
void setTextSize (float size)
 
void setTextSize (int unit, float size)
 
void setTextColorResource (int res)
 
boolean setImageResource (int res)
 
boolean setImageDrawable (@Nullable Drawable drawable)
 
void setImagePadding (int l, int t, int r, int b)
 
void setTextPadding (int l, int t, int r, int b)
 
void setContentView (View view)
 
void setBackgroundResource (int res)
 
void setFilters (InputFilter[] filters)
 
void setEllipsize (TextUtils.TruncateAt where)
 
void setMaxWidth (int maxWidth)
 
void setRelation (int relation)
 
void setEnable (boolean enabled)
 
void setClickable (boolean clickable)
 
void setSelected (boolean selected)
 
void setOnClickListener (View.OnClickListener l)
 
void setOnLongClickListener (View.OnLongClickListener l)
 
void setOnItemClickListener (OnItemClickListener l)
 
void setOnItemLongPressListener (OnItemLongPressListener l)
 
void setChecked (boolean checked)
 
boolean isChecked ()
 
void setTag (int tag)
 
int getTag ()
 
void setId (int id)
 
int getId ()
 
void setInterval (int interval)
 
void setDisplayStyle (ItemType type)
 
void onItemLayout (int left, int top, int right, int bottom)
 

Static Public Attributes

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

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.

◆ getTextView()

TextView com.foxit.uiextensions.controls.toolbar.IBaseItem.getTextView ( )

Return the TextView

◆ isChecked()

boolean com.foxit.uiextensions.controls.toolbar.IBaseItem.isChecked ( )
Returns
The current checked state of the item

◆ 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.

◆ setChecked()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setChecked ( boolean  checked)

Changes the checked state of this item.

Parameters
checkedtrue to check the button, false to uncheck it

◆ setClickable()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setClickable ( boolean  clickable)

Enables or disables click events for this item view. When a view is clickable it will change its state to "pressed" on every click. Subclasses should set the view clickable to visually react to user's clicks.

Parameters
clickabletrue to make the item view clickable, false otherwise

◆ 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  enabled)

Set the enabled state of this item.

Parameters
enabledTrue 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.

◆ setImagePadding()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setImagePadding ( int  l,
int  t,
int  r,
int  b 
)

Sets the padding of the image on the item

Parameters
lthe left padding in pixels
tthe top padding in pixels
rthe right padding in pixels
bthe bottom padding in pixels

◆ 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.

◆ setMaxWidth()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setMaxWidth ( int  maxWidth)

Limit control maximum width

Parameters
maxWidthMaximum width

◆ 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

◆ setOnItemClickListener()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setOnItemClickListener ( OnItemClickListener  l)

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

Parameters
lThe custom callback that will run

◆ setOnItemLongPressListener()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setOnItemLongPressListener ( OnItemLongPressListener  l)

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

Parameters
lThe custom 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

◆ 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  color)

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

Parameters
colorA color value in the form 0xAARRGGBB.

◆ setTextColor() [2/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.

◆ 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

◆ setTextPadding()

void com.foxit.uiextensions.controls.toolbar.IBaseItem.setTextPadding ( int  l,
int  t,
int  r,
int  b 
)

Sets the padding of the text on the item

Parameters
lthe left padding in pixels
tthe top padding in pixels
rthe right padding in pixels
bthe bottom padding in pixels

◆ setTextSize() [1/2]

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

Set the default text size to the given value, interpreted as "scaled pixel" units. This size is adjusted based on the current density and user font size preference.

Note: if this TextView has the auto-size feature enabled than this function is no-op.

Parameters
sizeThe scaled pixel size.

◆ setTextSize() [2/2]

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

Set the default text size to a given unit and value. See {} for the possible dimension units. Note: if this TextView has the auto-size feature enabled than this function is no-op.

Parameters
unitThe desired dimension unit.
sizeThe desired size in the given units.

◆ 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