com.ugrokit.api.UgiTitleView Class Reference

Overview

Title bar object including the a title and a UgiStatusImageView.

Public Member Functions

 UgiTitleView (Context context, AttributeSet attrs)
 Constructor. More...
 
void setBackButtonCompletion (Runnable completion)
 Set the code to run when the back button is touched. More...
 
void setRightButton (int resourceId, int color, int highlightedResourceId, int highlightedColor, Runnable handler)
 Set the right button image (via resource id) and handler. More...
 
void setRightButton (Drawable drawable, int color, Drawable highlightedDrawable, int highlightedColor, Runnable handler)
 Set the right button image (via drawable) and handler. More...
 
int getThemeColorOverride ()
 Get the color to use for the title view (to override the Activity's default) More...
 
void setThemeColorOverride (int themeColorOverride)
 Set the color to use for the title view. More...
 
int getTextColorOnThemeColorOverride ()
 Get the color to use when on top of the theme color. More...
 
void setTextColorOnThemeColorOverride (final int textColorOnThemeColorOverride)
 Set the theme color. More...
 
boolean getUseBackgroundBasedOnThemeColor ()
 Get whether the view have a gradient background using the theme color. More...
 
void setUseBackgroundBasedOnThemeColor (boolean b)
 Set whether the view have a gradient background using the theme color. More...
 
boolean getDisplayWaveAnimationWhileScanning ()
 Get whether a moving wave animation should be displayed while scanning. More...
 
void setDisplayWaveAnimationWhileScanning (boolean b)
 Set whether a moving wave animation should be displayed while scanning. More...
 
boolean getHideBatteryStatusIndicator ()
 Get whether to display the battery status indicator. More...
 
void setHideBatteryStatusIndicator (boolean b)
 Set whether to display the battery status indicator. More...
 
boolean getBatteryStatusIndicatorDisplayVersionInfoOnTouch ()
 Get whether to show version information alert when battery status indicator is touched. More...
 
void setBatteryStatusIndicatorDisplayVersionInfoOnTouch (boolean b)
 Set whether to show version information alert when battery status indicator is touched. More...
 
boolean isUseAppNameAsTitle ()
 See whether the app name should be used as the title if no title text is given. More...
 
void setUseAppNameAsTitle (boolean useAppNameAsTitle)
 Set whether the app name should be used as the title if no title text is given. More...
 
String getTheTitle ()
 Get the title. More...
 
void setTheTitle (String title)
 Set the title. More...
 
boolean doesTitleImageExist ()
 See if a title image exists. More...
 
void setTitleImage (Drawable drawable)
 Set the title image via a Drawable. More...
 
void setTitleImage (int resourceId)
 Set the title image via a resource id. More...
 

Member Function Documentation

◆ setBackButtonCompletion()

void com.ugrokit.api.UgiTitleView.setBackButtonCompletion ( Runnable  completion)

Set the code to run when the back button is touched.

Parameters
completioncode to run

◆ setRightButton() [1/2]

void com.ugrokit.api.UgiTitleView.setRightButton ( int  resourceId,
int  color,
int  highlightedResourceId,
int  highlightedColor,
Runnable  handler 
)

Set the right button image (via resource id) and handler.

Parameters
resourceIdButton image
colorColor for the image, or null to not change the image color
highlightedResourceIdButton image when highlighted
highlightedColorHighlighted color for the image, or null to not change the image color
handlerClick handler

◆ setRightButton() [2/2]

void com.ugrokit.api.UgiTitleView.setRightButton ( Drawable  drawable,
int  color,
Drawable  highlightedDrawable,
int  highlightedColor,
Runnable  handler 
)

Set the right button image (via drawable) and handler.

Parameters
drawableButton image
colorColor for the image, or null to not change the image color
highlightedDrawableButton image when highlighted
highlightedColorColor for the image when highlighted, or null to not change the image color
handlerClick handler

◆ getThemeColorOverride()

int com.ugrokit.api.UgiTitleView.getThemeColorOverride ( )

Get the color to use for the title view (to override the Activity's default)

Returns
The color

◆ setThemeColorOverride()

void com.ugrokit.api.UgiTitleView.setThemeColorOverride ( int  themeColorOverride)

Set the color to use for the title view.

Parameters
themeColorOverrideThe color

◆ getTextColorOnThemeColorOverride()

int com.ugrokit.api.UgiTitleView.getTextColorOnThemeColorOverride ( )

Get the color to use when on top of the theme color.

Returns
Color to use when on top of the theme color

◆ setTextColorOnThemeColorOverride()

void com.ugrokit.api.UgiTitleView.setTextColorOnThemeColorOverride ( final int  textColorOnThemeColorOverride)

Set the theme color.

Parameters
textColorOnThemeColorOverrideTheme color

◆ getUseBackgroundBasedOnThemeColor()

boolean com.ugrokit.api.UgiTitleView.getUseBackgroundBasedOnThemeColor ( )

Get whether the view have a gradient background using the theme color.

Returns
true to have a gradient background

◆ setUseBackgroundBasedOnThemeColor()

void com.ugrokit.api.UgiTitleView.setUseBackgroundBasedOnThemeColor ( boolean  b)

Set whether the view have a gradient background using the theme color.

Parameters
btrue to have a gradient background

◆ getDisplayWaveAnimationWhileScanning()

boolean com.ugrokit.api.UgiTitleView.getDisplayWaveAnimationWhileScanning ( )

Get whether a moving wave animation should be displayed while scanning.

Returns
true to display a moving wave animation while scanning

◆ setDisplayWaveAnimationWhileScanning()

void com.ugrokit.api.UgiTitleView.setDisplayWaveAnimationWhileScanning ( boolean  b)

Set whether a moving wave animation should be displayed while scanning.

Parameters
btrue to display a moving wave animation while scanning

◆ getHideBatteryStatusIndicator()

boolean com.ugrokit.api.UgiTitleView.getHideBatteryStatusIndicator ( )

Get whether to display the battery status indicator.

Returns
true to display the battery status indicator

◆ setHideBatteryStatusIndicator()

void com.ugrokit.api.UgiTitleView.setHideBatteryStatusIndicator ( boolean  b)

Set whether to display the battery status indicator.

Parameters
btrue to display the battery status indicator

◆ getBatteryStatusIndicatorDisplayVersionInfoOnTouch()

boolean com.ugrokit.api.UgiTitleView.getBatteryStatusIndicatorDisplayVersionInfoOnTouch ( )

Get whether to show version information alert when battery status indicator is touched.

Returns
whether to show version information alert when battery status indicator is touched

◆ setBatteryStatusIndicatorDisplayVersionInfoOnTouch()

void com.ugrokit.api.UgiTitleView.setBatteryStatusIndicatorDisplayVersionInfoOnTouch ( boolean  b)

Set whether to show version information alert when battery status indicator is touched.

Parameters
btrue to show alert

◆ isUseAppNameAsTitle()

boolean com.ugrokit.api.UgiTitleView.isUseAppNameAsTitle ( )

See whether the app name should be used as the title if no title text is given.

Returns
true to use app name as title

◆ setUseAppNameAsTitle()

void com.ugrokit.api.UgiTitleView.setUseAppNameAsTitle ( boolean  useAppNameAsTitle)

Set whether the app name should be used as the title if no title text is given.

Parameters
useAppNameAsTitletrue to use app name as title

◆ getTheTitle()

String com.ugrokit.api.UgiTitleView.getTheTitle ( )

Get the title.

Returns
the title

◆ setTheTitle()

void com.ugrokit.api.UgiTitleView.setTheTitle ( String  title)

Set the title.

Parameters
titleThe title to set

◆ doesTitleImageExist()

boolean com.ugrokit.api.UgiTitleView.doesTitleImageExist ( )

See if a title image exists.

Returns
true if a title image exists

◆ setTitleImage() [1/2]

void com.ugrokit.api.UgiTitleView.setTitleImage ( Drawable  drawable)

Set the title image via a Drawable.

Parameters
drawableThe title image to set

◆ setTitleImage() [2/2]

void com.ugrokit.api.UgiTitleView.setTitleImage ( int  resourceId)

Set the title image via a resource id.

Parameters
resourceIdThe title image to set

Constructor & Destructor Documentation

◆ UgiTitleView()

com.ugrokit.api.UgiTitleView.UgiTitleView ( Context  context,
AttributeSet  attrs 
)

Constructor.

Parameters
contextContext
attrsAttributes