From 70d8be7616a450e9b7ef09c8bda5a8b25936a29a Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 23 Jun 2015 19:33:02 +0000 Subject: Fix issue #22013372: Assist should take translationX and friends... ...into account when calculating the position information Actually what we need here is the full transformation matrix, if it is available. And that means actually computing the location of views on the screen requires doing this all through transformations, so the AssistVisualizer has been changed to do this (while still also keeping the old mechanism for comparison to verify that things are working correctly). Also added new properties for elevation and alpha. And optimized the parcelling of AssistStructure to not write things that aren't needed; this reduces the parcelled size by about half. Change-Id: I50b0dd2e6599c74701a5d188617a3eff64b07d03 --- .../res/layout/voice_interaction_session.xml | 41 +++++--- tests/VoiceInteraction/res/values/strings.xml | 2 + .../test/voiceinteraction/AssistVisualizer.java | 103 ++++++++++++++++++--- .../voiceinteraction/MainInteractionSession.java | 29 +++++- 4 files changed, 143 insertions(+), 32 deletions(-) (limited to 'tests') diff --git a/tests/VoiceInteraction/res/layout/voice_interaction_session.xml b/tests/VoiceInteraction/res/layout/voice_interaction_session.xml index d44afb0..610f30b 100644 --- a/tests/VoiceInteraction/res/layout/voice_interaction_session.xml +++ b/tests/VoiceInteraction/res/layout/voice_interaction_session.xml @@ -18,6 +18,11 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + + @@ -30,19 +35,29 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top" - android:orientation="vertical" + android:orientation="horizontal" android:background="#ffffffff" android:elevation="8dp" > -