Public Member Functions
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

  completion | code 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

  resourceId | Button image
  color | Color for the image, or null to not change the image color
  highlightedResourceId | Button image when highlighted
  highlightedColor | Highlighted color for the image, or null to not change the image color
  handler | Click 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

  drawable | Button image
  color | Color for the image, or null to not change the image color
  highlightedDrawable | Button image when highlighted
  highlightedColor | Color for the image when highlighted, or null to not change the image color
  handler | Click 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

  themeColorOverride | The 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

  textColorOnThemeColorOverride | Theme 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

  b | true 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

  b | true 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

  b | true 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

  b | true 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

  useAppNameAsTitle | true 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

  title | The 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

  drawable | The title image to set

## ◆ setTitleImage() [2/2]

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

Set the title image via a resource id.

Parameters

  resourceId | The title image to set

## Constructor & Destructor Documentation

## ◆ UgiTitleView()

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

Constructor.

Parameters

  context | Context
  attrs | Attributes