diff options
author | Dianne Hackborn <hackbod@google.com> | 2015-02-25 11:08:11 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2015-02-25 17:36:17 -0800 |
commit | ffeecb1bfb9b71f4b62c9ef1fbf7b58a7a63f655 (patch) | |
tree | 79ce65f76cff29d67abc6b867f0f79795be7a38b /tests/VoiceInteraction/res | |
parent | 6e53931f49f49245deef8622eb8e7dc6ccf04536 (diff) | |
download | frameworks_base-ffeecb1bfb9b71f4b62c9ef1fbf7b58a7a63f655.zip frameworks_base-ffeecb1bfb9b71f4b62c9ef1fbf7b58a7a63f655.tar.gz frameworks_base-ffeecb1bfb9b71f4b62c9ef1fbf7b58a7a63f655.tar.bz2 |
Rework voice interaction session lifecycle.
We now have a formal concept of the session being shown and
hidden, with it being able to continue running while hidden
as long as there is enough RAM.
This changes the flow that a VoiceInteractionSession will
see: onCreate() is when it is first created, onCreateContentView()
is when its UI first needs to be built, onShow() is called each
time it needs to be shown and has the arguments given when the
show request was made (which has been renamed from startSession to
showSession), and then onHide() will be called when the UI is
no longer shown.
The methods show() and hide() now allow a VoiceInteractionSession
subclass to control when it is shown and hidden, working with the
shown state being maintained by the system.
Change-Id: Ic4a430ec7e8bf76a5441fd0425e2932806170fcc
Diffstat (limited to 'tests/VoiceInteraction/res')
-rw-r--r-- | tests/VoiceInteraction/res/layout/test_interaction.xml | 7 | ||||
-rw-r--r-- | tests/VoiceInteraction/res/values/strings.xml | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/VoiceInteraction/res/layout/test_interaction.xml b/tests/VoiceInteraction/res/layout/test_interaction.xml index c4e280e..f4648b5 100644 --- a/tests/VoiceInteraction/res/layout/test_interaction.xml +++ b/tests/VoiceInteraction/res/layout/test_interaction.xml @@ -48,4 +48,11 @@ android:text="@string/abortVoice" /> + <Button android:id="@+id/cancel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:text="@string/cancelVoice" + /> + </LinearLayout> diff --git a/tests/VoiceInteraction/res/values/strings.xml b/tests/VoiceInteraction/res/values/strings.xml index 7eec90c..9f99c97 100644 --- a/tests/VoiceInteraction/res/values/strings.xml +++ b/tests/VoiceInteraction/res/values/strings.xml @@ -22,6 +22,7 @@ <string name="complete">Complete</string> <string name="abortVoice">Abort Voice</string> <string name="completeVoice">Complete Voice</string> + <string name="cancelVoice">Cancel</string> </resources> |