AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.theme.ThemeHelper Interface Reference
Inheritance diagram for com.google.appinventor.components.runtime.util.theme.ThemeHelper:
com.google.appinventor.components.runtime.util.theme.ClassicThemeHelper com.google.appinventor.components.runtime.util.theme.HoneycombThemeHelper com.google.appinventor.components.runtime.util.theme.IceCreamSandwichThemeHelper

Public Member Functions

void requestActionBar ()
 
boolean setActionBarVisible (boolean visible)
 
boolean hasActionBar ()
 
void setTitle (String title)
 
void setActionBarAnimation (boolean enabled)
 
void setTitle (String title, boolean black)
 

Detailed Description

Definition at line 8 of file ThemeHelper.java.

Member Function Documentation

◆ hasActionBar()

boolean com.google.appinventor.components.runtime.util.theme.ThemeHelper.hasActionBar ( )

◆ requestActionBar()

void com.google.appinventor.components.runtime.util.theme.ThemeHelper.requestActionBar ( )

◆ setActionBarAnimation()

void com.google.appinventor.components.runtime.util.theme.ThemeHelper.setActionBarAnimation ( boolean  enabled)

Sets whether the ActionBar appear/disappear animation is shown (AppCompat mode only).

Parameters
enabledtrue if the animation should be used when visibility of the ActionBar is toggled, otherwise false.

Implemented in com.google.appinventor.components.runtime.util.theme.HoneycombThemeHelper, com.google.appinventor.components.runtime.util.theme.IceCreamSandwichThemeHelper, and com.google.appinventor.components.runtime.util.theme.ClassicThemeHelper.

◆ setActionBarVisible()

boolean com.google.appinventor.components.runtime.util.theme.ThemeHelper.setActionBarVisible ( boolean  visible)

Change the ActionBar visibility

Parameters
visibletrue if the ActionBar should be made visible, otherwise false.
Returns
true if the ActionBar is available. If false is returned, no future requests for the ActionBar will be honored (usually due to being in Classic theme mode).

Implemented in com.google.appinventor.components.runtime.util.theme.HoneycombThemeHelper, com.google.appinventor.components.runtime.util.theme.IceCreamSandwichThemeHelper, and com.google.appinventor.components.runtime.util.theme.ClassicThemeHelper.

◆ setTitle() [1/2]

void com.google.appinventor.components.runtime.util.theme.ThemeHelper.setTitle ( String  title)

◆ setTitle() [2/2]

void com.google.appinventor.components.runtime.util.theme.ThemeHelper.setTitle ( String  title,
boolean  black 
)

Sets the title of the ActionBar and its color. If

black

is true, the helper should attempt to make the text black. Otherwise, the text will be white.

Parameters
titlethe new title for the ActionBar
blacktrue if black text is desired, false if white text is desired

Implemented in com.google.appinventor.components.runtime.util.theme.IceCreamSandwichThemeHelper, com.google.appinventor.components.runtime.util.theme.HoneycombThemeHelper, and com.google.appinventor.components.runtime.util.theme.ClassicThemeHelper.


The documentation for this interface was generated from the following file: