public class VoiceSearchUIConfig
extends java.lang.Object
Use to override the default color and behavior of the HoundifyVoiceSearchActivity. This can be configure at application startup and applied by calling Houndify.setVoiceSearchUIConfig()
Modifier and Type | Field and Description |
---|---|
protected java.lang.Integer |
buttonColor |
protected java.lang.String |
helpURL |
protected java.lang.String |
hintSubtitleText |
protected java.lang.String |
hintTitleText |
protected java.lang.Integer |
panelColor |
protected java.lang.Integer |
scrimAlpha |
protected java.lang.Integer |
scrimColor |
protected java.lang.Integer |
searchButtonColor |
protected java.lang.String |
subtitleText |
protected java.lang.Integer |
textColor |
protected android.graphics.Typeface |
textTypeFace |
protected java.lang.String |
titleText |
protected boolean |
useBlackAttributionImage |
protected VoiceSearchUIHelpClickListener |
voiceSearchUIHelpClickListener |
Constructor and Description |
---|
VoiceSearchUIConfig() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getButtonColor()
Returns the color used for drawing all the buttons.
|
java.lang.String |
getHelpURL()
Returns the help URL associated with the help button.
|
java.lang.String |
getHintSubtitleText()
Returns the hint subtitle text, of null if none is set.
|
java.lang.String |
getHintTitleText()
Returns the current hint text, null if not set.
|
java.lang.Integer |
getPanelColor()
Gets the background color used in the panel containing the search button.
|
java.lang.Integer |
getScrimAlpha()
Value of 0-255 for Srim's opacity.
|
java.lang.Integer |
getScrimColor() |
java.lang.Integer |
getSearchButtonColor()
Returns the search button color or null if default color is being used.
|
java.lang.String |
getSubtitleText()
Returns the subtitle text or null if not set.
|
java.lang.Integer |
getTextColor()
Returns the color to use for rendering all text.
|
android.graphics.Typeface |
getTextTypeFace()
Returns the TypeFace being used for text or null if default Roboto is being used.
|
java.lang.String |
getTitleText()
Returns the title text on the search panel.
|
VoiceSearchUIHelpClickListener |
getVoiceSearchUIHelpClickListener()
Returns the active voiceSearchUIHelpClickListener, null if none is configured.
|
boolean |
isUseBlackAttributionImage()
Returns true if the black attribution image is being used, false if white is
being used.
|
VoiceSearchUIConfig |
setButtonColor(java.lang.Integer buttonColor)
Sets the color to use for all the buttons except the search button
|
VoiceSearchUIConfig |
setHelpURL(java.lang.String helpURL)
Sets a help URL which will be linked with the help button and triggered when
click.
|
VoiceSearchUIConfig |
setHintSubtitleText(java.lang.String hintSubtitleText)
Sets the hint subtitle text to be display below the Hint Title Text.
|
VoiceSearchUIConfig |
setHintTitleText(java.lang.String hintTitleText)
Sets the hint text used if user delays saying request.
|
VoiceSearchUIConfig |
setPanelColor(java.lang.Integer panelColor)
Sets the background color used in the panel containing the search button.
|
VoiceSearchUIConfig |
setScrimAlpha(java.lang.Integer scrimAlpha)
Set value of 0-255 for Srim's opacity
|
VoiceSearchUIConfig |
setScrimColor(java.lang.Integer scrimColor) |
VoiceSearchUIConfig |
setSearchButtonColor(java.lang.Integer searchButtonColor)
Sets the search button color
|
VoiceSearchUIConfig |
setSubtitleText(java.lang.String subtitleText)
Sets the subtitle text to be display the title text.
|
VoiceSearchUIConfig |
setTextColor(java.lang.Integer textColor)
Sets the text color for all text.
|
VoiceSearchUIConfig |
setTextTypeFace(android.graphics.Typeface textTypeFace)
Set the text type face to use for all text.
|
VoiceSearchUIConfig |
setTitleText(java.lang.String titleText)
Sets the title text on the search panel (default is "Speak Now")
|
VoiceSearchUIConfig |
setUseBlackAttributionImage(boolean useBlackAttributionImage)
Set true to use the black Houndification attribution image in place of the
default white image.
|
VoiceSearchUIConfig |
setVoiceSearchUIHelpClickListener(VoiceSearchUIHelpClickListener voiceSearchUIHelpClickListener)
Sets a help button click listener for handling the listening pages help button click
directly.
|
protected java.lang.Integer panelColor
protected java.lang.Integer scrimColor
protected java.lang.Integer scrimAlpha
protected java.lang.Integer textColor
protected android.graphics.Typeface textTypeFace
protected java.lang.Integer searchButtonColor
protected java.lang.Integer buttonColor
protected java.lang.String titleText
protected java.lang.String subtitleText
protected java.lang.String hintTitleText
protected java.lang.String hintSubtitleText
protected boolean useBlackAttributionImage
protected java.lang.String helpURL
protected VoiceSearchUIHelpClickListener voiceSearchUIHelpClickListener
public java.lang.Integer getPanelColor()
public VoiceSearchUIConfig setPanelColor(java.lang.Integer panelColor)
panelColor
- public java.lang.Integer getScrimColor()
public VoiceSearchUIConfig setScrimColor(java.lang.Integer scrimColor)
public VoiceSearchUIConfig setTextColor(java.lang.Integer textColor)
textColor
- public java.lang.Integer getTextColor()
public VoiceSearchUIConfig setTextTypeFace(android.graphics.Typeface textTypeFace)
textTypeFace
- public android.graphics.Typeface getTextTypeFace()
public VoiceSearchUIConfig setSearchButtonColor(java.lang.Integer searchButtonColor)
searchButtonColor
- public java.lang.Integer getSearchButtonColor()
public VoiceSearchUIConfig setButtonColor(java.lang.Integer buttonColor)
buttonColor
- public java.lang.Integer getButtonColor()
public java.lang.Integer getScrimAlpha()
public VoiceSearchUIConfig setScrimAlpha(java.lang.Integer scrimAlpha)
scrimAlpha
- public java.lang.String getTitleText()
public VoiceSearchUIConfig setTitleText(java.lang.String titleText)
titleText
- public java.lang.String getSubtitleText()
public VoiceSearchUIConfig setSubtitleText(java.lang.String subtitleText)
subtitleText
- public VoiceSearchUIConfig setHintTitleText(java.lang.String hintTitleText)
hintTitleText
- public java.lang.String getHintTitleText()
public VoiceSearchUIConfig setHintSubtitleText(java.lang.String hintSubtitleText)
hintSubtitleText
- public java.lang.String getHintSubtitleText()
public VoiceSearchUIConfig setUseBlackAttributionImage(boolean useBlackAttributionImage)
useBlackAttributionImage
- true for black image, false for white image.public boolean isUseBlackAttributionImage()
public VoiceSearchUIConfig setHelpURL(java.lang.String helpURL)
helpURL
- public java.lang.String getHelpURL()
public VoiceSearchUIConfig setVoiceSearchUIHelpClickListener(VoiceSearchUIHelpClickListener voiceSearchUIHelpClickListener)
voiceSearchUIHelpClickListener
- public VoiceSearchUIHelpClickListener getVoiceSearchUIHelpClickListener()