diff options
Diffstat (limited to 'tests/VoiceInteraction/res')
-rw-r--r-- | tests/VoiceInteraction/res/layout/main.xml | 21 | ||||
-rw-r--r-- | tests/VoiceInteraction/res/layout/test_interaction.xml | 72 | ||||
-rw-r--r-- | tests/VoiceInteraction/res/layout/voice_interaction_session.xml | 102 | ||||
-rw-r--r-- | tests/VoiceInteraction/res/values/strings.xml | 239 | ||||
-rw-r--r-- | tests/VoiceInteraction/res/xml/interaction_service.xml | 3 |
5 files changed, 405 insertions, 32 deletions
diff --git a/tests/VoiceInteraction/res/layout/main.xml b/tests/VoiceInteraction/res/layout/main.xml index 3d7a418..a83d02c 100644 --- a/tests/VoiceInteraction/res/layout/main.xml +++ b/tests/VoiceInteraction/res/layout/main.xml @@ -26,6 +26,27 @@ android:text="@string/start" /> + <CheckBox android:id="@+id/secure" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/secure" + /> + + <com.android.test.voiceinteraction.AsyncStructure + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="64dp" + android:text="@string/asyncStructure" + /> + + <EditText android:id="@+id/text" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:paddingTop="64dp" + android:paddingBottom="64dp" + android:text="@string/largetext" /> + </LinearLayout> diff --git a/tests/VoiceInteraction/res/layout/test_interaction.xml b/tests/VoiceInteraction/res/layout/test_interaction.xml index d55736f..277117e 100644 --- a/tests/VoiceInteraction/res/layout/test_interaction.xml +++ b/tests/VoiceInteraction/res/layout/test_interaction.xml @@ -32,21 +32,77 @@ android:layout_weight="1" android:layout_marginTop="16dp" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="#ffffffff" /> - <Button android:id="@+id/complete" - android:layout_width="wrap_content" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:text="@string/completeVoice" - /> + android:orientation="horizontal"> + + <Button android:id="@+id/airplane" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/launchAirplane" + /> + + </LinearLayout> + + <LinearLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:orientation="horizontal"> + + <Button android:id="@+id/complete" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/completeVoice" + /> + + <Button android:id="@+id/abort" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/abortVoice" + /> - <Button android:id="@+id/abort" - android:layout_width="wrap_content" + </LinearLayout> + + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:text="@string/abortVoice" + android:orientation="horizontal"> + + <Button android:id="@+id/command" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/commandVoice" + /> + + <Button android:id="@+id/pick" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/pickVoice" + /> + + </LinearLayout> + + <LinearLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp" + android:orientation="horizontal"> + + <Button android:id="@+id/cancel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/cancelVoice" + /> + + <Button android:id="@+id/jump" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/jumpOut" /> + </LinearLayout> + </LinearLayout> diff --git a/tests/VoiceInteraction/res/layout/voice_interaction_session.xml b/tests/VoiceInteraction/res/layout/voice_interaction_session.xml index 002f350..b106437 100644 --- a/tests/VoiceInteraction/res/layout/voice_interaction_session.xml +++ b/tests/VoiceInteraction/res/layout/voice_interaction_session.xml @@ -15,51 +15,109 @@ --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="match_parent" - android:fitsSystemWindows="true"> + android:layout_width="match_parent" + android:layout_height="match_parent"> - <FrameLayout android:layout_width="fill_parent" + <ImageView android:id="@+id/full_screenshot" + android:layout_width="match_parent" android:layout_height="match_parent" - android:padding="8dp"> + android:visibility="invisible"/> - <LinearLayout android:id="@+id/content" - android:layout_width="fill_parent" - android:layout_height="match_parent" + <com.android.test.voiceinteraction.AssistVisualizer android:id="@+id/assist_visualizer" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + <FrameLayout android:layout_width="match_parent" + android:layout_height="match_parent" + android:fitsSystemWindows="true"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="top" + android:orientation="vertical" + android:background="#ffffffff" + android:elevation="8dp" + > + <LinearLayout android:id="@+id/top_content" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <ImageView android:id="@+id/screenshot" + android:layout_width="wrap_content" + android:layout_height="46dp" + android:adjustViewBounds="true" /> + <View android:layout_width="0dp" + android:layout_height="0dp" + android:layout_weight="1" /> + <CheckBox android:id="@+id/show_options" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + <Button android:id="@+id/do_tree" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/tree" /> + <Button android:id="@+id/do_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/text" /> + <Button android:id="@+id/start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/start" /> + </LinearLayout> + <LinearLayout android:id="@+id/options" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + > + <CheckBox android:id="@+id/disallow_structure" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Disallow context" /> + <CheckBox android:id="@+id/disallow_screenshot" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Disallow screenshot" /> + <TextView android:id="@+id/options_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp" + android:textAppearance="?android:attr/textAppearanceMedium" /> + </LinearLayout> + </LinearLayout> + + <LinearLayout android:id="@+id/bottom_content" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="bottom" android:orientation="vertical" android:background="#ffffffff" android:elevation="8dp" > <TextView android:id="@+id/text" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="16dp" - android:textAppearance="?android:attr/textAppearanceMedium" - /> + android:textAppearance="?android:attr/textAppearanceMedium" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> - <Button android:id="@+id/start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/start" - /> <Button android:id="@+id/confirm" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/confirm" - /> + android:text="@string/confirm" /> <Button android:id="@+id/complete" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/complete" - /> + android:text="@string/complete" /> <Button android:id="@+id/abort" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/abort" - /> + android:text="@string/abort" /> </LinearLayout> </LinearLayout> diff --git a/tests/VoiceInteraction/res/values/strings.xml b/tests/VoiceInteraction/res/values/strings.xml index 7eec90c..c665c23 100644 --- a/tests/VoiceInteraction/res/values/strings.xml +++ b/tests/VoiceInteraction/res/values/strings.xml @@ -17,11 +17,248 @@ <resources> <string name="start">Start</string> + <string name="secure">Secure</string> + <string name="tree">Tree</string> + <string name="text">Text</string> + <string name="asyncStructure">(Async structure goes here)</string> + <string name="launchAirplane">Launch airplane mode</string> <string name="confirm">Confirm</string> <string name="abort">Abort</string> <string name="complete">Complete</string> <string name="abortVoice">Abort Voice</string> + <string name="commandVoice">Command</string> <string name="completeVoice">Complete Voice</string> + <string name="pickVoice">Pick Voice</string> + <string name="cancelVoice">Cancel</string> + <string name="jumpOut">Jump out</string> + <string name="largetext">This is a bunch of text that we will use to show how we handle it +when reporting it for assist data. We need many many lines of text, like\n +this\n +and\n +this other\n +one\n +two\n +three\n +four\n +five\n +six\n +seven\n +eight\n +nine\n +ten\n +eleven\n +twelve\n +thirteen\n +fourteen\n +fifteen\n +sixteen\n +seventeen\n +eighteen\n +nineteen\n +twenty\n +<big><big><big>So shaken as we are, so wan with care,\n +Find we a time for frighted peace to pant,\n</big> +And breathe short-winded accents of new broils\n +To be commenced in strands afar remote.\n</big> +No more the thirsty entrance of this soil\n +Shall daub her lips with her own children\'s blood;\n</big> +<b>Nor more shall trenching war channel her fields,\n +Nor bruise her flowerets with the armed hoofs\n</b> +<i>Of hostile paces: those opposed eyes,\n +Which, like the meteors of a troubled heaven,\n</i> +All of one nature, of one substance bred,\n +Did lately meet in the intestine shock\n +And furious close of civil butchery\n +Shall now, in mutual well-beseeming ranks,\n +March all one way and be no more opposed\n +Against acquaintance, kindred and allies:\n +The edge of war, like an ill-sheathed knife,\n +No more shall cut his master. Therefore, friends,\n +As far as to the sepulchre of Christ,\n +Whose soldier now, under whose blessed cross\n +We are impressed and engaged to fight,\n +Forthwith a power of English shall we levy;\n +Whose arms were moulded in their mothers\' womb\n +To chase these pagans in those holy fields\n +Over whose acres walk\'d those blessed feet\n +Which fourteen hundred years ago were nail\'d\n +For our advantage on the bitter cross.\n +But this our purpose now is twelve month old,\n +And bootless \'tis to tell you we will go:\n +Therefore we meet not now. Then let me hear\n +Of you, my gentle cousin Westmoreland,\n +What yesternight our council did decree\n +In forwarding this dear expedience.\n +\n +Hear him but reason in divinity,\n +And all-admiring with an inward wish\n +You would desire the king were made a prelate:\n +Hear him debate of commonwealth affairs,\n +You would say it hath been all in all his study:\n +List his discourse of war, and you shall hear\n +A fearful battle render\'d you in music:\n +Turn him to any cause of policy,\n +The Gordian knot of it he will unloose,\n +Familiar as his garter: that, when he speaks,\n +The air, a charter\'d libertine, is still,\n +And the mute wonder lurketh in men\'s ears,\n +To steal his sweet and honey\'d sentences;\n +So that the art and practic part of life\n +Must be the mistress to this theoric:\n +Which is a wonder how his grace should glean it,\n +Since his addiction was to courses vain,\n +His companies unletter\'d, rude and shallow,\n +His hours fill\'d up with riots, banquets, sports,\n +And never noted in him any study,\n +Any retirement, any sequestration\n +From open haunts and popularity.\n +\n +I come no more to make you laugh: things now,\n +That bear a weighty and a serious brow,\n +Sad, high, and working, full of state and woe,\n +Such noble scenes as draw the eye to flow,\n +e now present. Those that can pity, here\n +May, if they think it well, let fall a tear;\n +The subject will deserve it. Such as give\n +Their money out of hope they may believe,\n +May here find truth too. Those that come to see\n +Only a show or two, and so agree\n +The play may pass, if they be still and willing,\n +I\'ll undertake may see away their shilling\n +Richly in two short hours. Only they\n +That come to hear a merry bawdy play,\n +A noise of targets, or to see a fellow\n +In a long motley coat guarded with yellow,\n +Will be deceived; for, gentle hearers, know,\n +To rank our chosen truth with such a show\n +As fool and fight is, beside forfeiting\n +Our own brains, and the opinion that we bring,\n +To make that only true we now intend,\n +Will leave us never an understanding friend.\n +Therefore, for goodness\' sake, and as you are known\n +The first and happiest hearers of the town,\n +Be sad, as we would make ye: think ye see\n +The very persons of our noble story\n +As they were living; think you see them great,\n +And follow\'d with the general throng and sweat\n +Of thousand friends; then in a moment, see\n +How soon this mightiness meets misery:\n +And, if you can be merry then, I\'ll say\n +A man may weep upon his wedding-day.\n +\n +<big>First, heaven be the record to my speech!\n +In the devotion of a subject\'s love,\n</big> +<b>Tendering the precious safety of my prince,\n +And free from other misbegotten hate,\n</b> +Come I appellant to this princely presence.\n +Now, Thomas Mowbray, do I turn to thee,\n +And mark my greeting well; for what I speak\n +My body shall make good upon this earth,\n +Or my divine soul answer it in heaven.\n +Thou art a traitor and a miscreant,\n +Too good to be so and too bad to live,\n +Since the more fair and crystal is the sky,\n +The uglier seem the clouds that in it fly.\n +Once more, the more to aggravate the note,\n +With a foul traitor\'s name stuff I thy throat;\n +And wish, so please my sovereign, ere I move,\n +What my tongue speaks my right drawn sword may prove.\n +\n +Now is the winter of our discontent\n +Made glorious summer by this sun of York;\n +And all the clouds that lour\'d upon our house\n +In the deep bosom of the ocean buried.\n +Now are our brows bound with victorious wreaths;\n +Our bruised arms hung up for monuments;\n +Our stern alarums changed to merry meetings,\n +Our dreadful marches to delightful measures.\n +Grim-visaged war hath smooth\'d his wrinkled front;\n +And now, instead of mounting barded steeds\n +To fright the souls of fearful adversaries,\n +He capers nimbly in a lady\'s chamber\n +To the lascivious pleasing of a lute.\n +But I, that am not shaped for sportive tricks,\n +Nor made to court an amorous looking-glass;\n +I, that am rudely stamp\'d, and want love\'s majesty\n +To strut before a wanton ambling nymph;\n +I, that am curtail\'d of this fair proportion,\n +Cheated of feature by dissembling nature,\n +Deformed, unfinish\'d, sent before my time\n +Into this breathing world, scarce half made up,\n +And that so lamely and unfashionable\n +That dogs bark at me as I halt by them;\n +Why, I, in this weak piping time of peace,\n +Have no delight to pass away the time,\n +Unless to spy my shadow in the sun\n +And descant on mine own deformity:\n +And therefore, since I cannot prove a lover,\n +To entertain these fair well-spoken days,\n +I am determined to prove a villain\n +And hate the idle pleasures of these days.\n +Plots have I laid, inductions dangerous,\n +By drunken prophecies, libels and dreams,\n +To set my brother Clarence and the king\n +In deadly hate the one against the other:\n +And if King Edward be as true and just\n +As I am subtle, false and treacherous,\n +This day should Clarence closely be mew\'d up,\n +About a prophecy, which says that \'G\'\n +Of Edward\'s heirs the murderer shall be.\n +Dive, thoughts, down to my soul: here\n +Clarence comes.\n +\n +To bait fish withal: if it will feed nothing else,\n +it will feed my revenge. He hath disgraced me, and\n +hindered me half a million; laughed at my losses,\n +mocked at my gains, scorned my nation, thwarted my\n +bargains, cooled my friends, heated mine\n +enemies; and what\'s his reason? I am a Jew. Hath\n +not a Jew eyes? hath not a Jew hands, organs,\n +dimensions, senses, affections, passions? fed with\n +the same food, hurt with the same weapons, subject\n +to the same diseases, healed by the same means,\n +warmed and cooled by the same winter and summer, as\n +a Christian is? If you prick us, do we not bleed?\n +if you tickle us, do we not laugh? if you poison\n +us, do we not die? and if you wrong us, shall we not\n +revenge? If we are like you in the rest, we will\n +resemble you in that. If a Jew wrong a Christian,\n +what is his humility? Revenge. If a Christian\n +wrong a Jew, what should his sufferance be by\n +Christian example? Why, revenge. The villany you\n +teach me, I will execute, and it shall go hard but I\n +will better the instruction.\n +\n +Virtue! a fig! \'tis in ourselves that we are thus\n +or thus. Our bodies are our gardens, to the which\n +our wills are gardeners: so that if we will plant\n +nettles, or sow lettuce, set hyssop and weed up\n +thyme, supply it with one gender of herbs, or\n +distract it with many, either to have it sterile\n +with idleness, or manured with industry, why, the\n +power and corrigible authority of this lies in our\n +wills. If the balance of our lives had not one\n +scale of reason to poise another of sensuality, the\n +blood and baseness of our natures would conduct us\n +to most preposterous conclusions: but we have\n +reason to cool our raging motions, our carnal\n +stings, our unbitted lusts, whereof I take this that\n +you call love to be a sect or scion.\n +\n +Blow, winds, and crack your cheeks! rage! blow!\n +You cataracts and hurricanoes, spout\n +Till you have drench\'d our steeples, drown\'d the cocks!\n +You sulphurous and thought-executing fires,\n +Vaunt-couriers to oak-cleaving thunderbolts,\n +Singe my white head! And thou, all-shaking thunder,\n +Smite flat the thick rotundity o\' the world!\n +Crack nature\'s moulds, an germens spill at once,\n +That make ingrateful man! +5...\n +4...\n +3...\n +2...\n +1...\n +BEEEEEEEEEEEEEEEEEP!</string> </resources> - diff --git a/tests/VoiceInteraction/res/xml/interaction_service.xml b/tests/VoiceInteraction/res/xml/interaction_service.xml index ce5669c..c015ad2 100644 --- a/tests/VoiceInteraction/res/xml/interaction_service.xml +++ b/tests/VoiceInteraction/res/xml/interaction_service.xml @@ -20,4 +20,5 @@ <voice-interaction-service xmlns:android="http://schemas.android.com/apk/res/android" android:sessionService="com.android.test.voiceinteraction.MainInteractionSessionService" android:recognitionService="com.android.test.voiceinteraction.MainRecognitionService" - android:settingsActivity="com.android.test.voiceinteraction.SettingsActivity" /> + android:settingsActivity="com.android.test.voiceinteraction.SettingsActivity" + android:supportsAssist="true" /> |