public static class VoiceInteractor.Prompt extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<VoiceInteractor.Prompt> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
Prompt(CharSequence prompt)
Constructs a prompt set with single prompt used for all interactions.
|
Prompt(CharSequence[] voicePrompts,
CharSequence visualPrompt)
Constructs a prompt set.
|
Modifier and Type | Method and Description |
---|---|
int |
countVoicePrompts()
Returns the number of different voice prompts.
|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
CharSequence |
getVisualPrompt()
Returns the prompt to use for visual display.
|
CharSequence |
getVoicePromptAt(int index)
Returns a prompt to use for voice interactions.
|
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public static final Parcelable.Creator<VoiceInteractor.Prompt> CREATOR
public Prompt(CharSequence[] voicePrompts, CharSequence visualPrompt)
voicePrompts
- An array of one or more voice prompts. Must not be empty or null.visualPrompt
- A prompt to display on the screen. Must not be null.public Prompt(CharSequence prompt)
public CharSequence getVoicePromptAt(int index)
public int countVoicePrompts()
public CharSequence getVisualPrompt()
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.