Commit 6e71e151 authored by Marian Fechete's avatar Marian Fechete Committed by Commit Bot

[Autofill Assistant] Update onboarding informational text.

This CL updates the layout and informational messages for the AA
onboarding screen. Please see screenshots in the bug.

Bug: b/150927780
Change-Id: Id1ac924486ac40b9072477923d44b53884cc2a01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128320Reviewed-by: default avatarClemens Arbesser <arbesser@google.com>
Commit-Queue: Marian Fechete <marianfe@google.com>
Cr-Commit-Position: refs/heads/master@{#755326}
parent 4e1fcc3b
......@@ -48,11 +48,8 @@
android:textAppearance="@style/TextAppearance.Headline.Primary"
android:gravity="center"
android:text="@string/autofill_assistant_init_title" />
<!-- This balances the picture on the other side to make the text centered-->
</LinearLayout>
<!-- Subtitle (e.g., 'Google Assistant saves you time...')-->
<LinearLayout
android:layout_width="match_parent"
......@@ -61,12 +58,12 @@
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"/>
<!-- The subtitle takes 4/6 of the screen width. -->
<!-- The subtitle takes 3/4 of the screen width. -->
<TextView
android:id="@+id/onboarding_subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:layout_weight="6"
android:layout_marginTop="20dp"
android:textAppearance="@style/TextAppearance.AssistantBlackBody"
android:gravity="center_horizontal"
......
......@@ -8,7 +8,6 @@ import android.content.Context;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ScrollView;
import android.widget.TextView;
......@@ -207,13 +206,13 @@ class AssistantOnboardingCoordinator {
TextView termsTextView = initView.findViewById(R.id.onboarding_subtitle);
switch (mParameters.get(INTENT_IDENTFIER)) {
case RENT_CAR_INTENT:
termsTextView.setVisibility(View.GONE);
termsTextView.setText(R.string.autofill_assistant_init_message_short);
titleTextView.setText(R.string.autofill_assistant_init_message_rent_car);
break;
case BUY_MOVIE_TICKETS_INTENT:
if (Arrays.asList(mExperimentIds.split(","))
.contains(BUY_MOVIE_TICKETS_EXPERIMENT_ID)) {
termsTextView.setVisibility(View.GONE);
termsTextView.setText(R.string.autofill_assistant_init_message_short);
titleTextView.setText(
R.string.autofill_assistant_init_message_buy_movie_tickets);
}
......
......@@ -174,14 +174,17 @@
Try Google Assistant \n in Chrome
</message>
<message name="IDS_AUTOFILL_ASSISTANT_INIT_MESSAGE_RENT_CAR" desc="Onboarding message describing autofill assistant's capability for car rentals.">
Rent a car \n with Google Assistant \n in just a few taps.
Rent a car \n in just a few taps
</message>
<message name="IDS_AUTOFILL_ASSISTANT_INIT_MESSAGE_BUY_MOVIE_TICKETS" desc="Onboarding message describing autofill assistant's capability for movie tickets.">
Buy movie tickets \n with Google Assistant \n in just a few taps.
Buy movie tickets \n in just a few taps
</message>
<message name="IDS_AUTOFILL_ASSISTANT_INIT_MESSAGE" desc="Onboarding message describing autofill assistant's capability.">
Google Assistant saves you time by helping you complete actions on the web, like search and checkout.
</message>
<message name="IDS_AUTOFILL_ASSISTANT_INIT_MESSAGE_SHORT" desc="Short onboarding message describing autofill assistant's capability.">
Google Assistant in Chrome can complete actions across websites for you
</message>
<message name="IDS_AUTOFILL_ASSISTANT_GOOGLE_TERMS_DESCRIPTION" desc="Message linking to the Google terms and conditions for Google Assistant in Chrome.">
To help you complete tasks, Google will receive the URLs and contents of sites on which you use Assistant, as well as information you submit through Assistant. This information may be stored in your Google account. You can turn off Assistant in Chrome settings. <ph name="BEGIN_LINK">&lt;link&gt;</ph>Learn&#xA0;more<ph name="END_LINK">&lt;/link&gt;</ph>
</message>
......
......@@ -182,7 +182,9 @@ public class AssistantOnboardingCoordinatorTest {
TextView termsView = mBottomSheetController.getBottomSheetViewForTesting().findViewById(
R.id.onboarding_subtitle);
assertEquals(View.GONE, termsView.getVisibility());
assertEquals(
mActivity.getResources().getText(R.string.autofill_assistant_init_message_short),
termsView.getText());
TextView titleView = mBottomSheetController.getBottomSheetViewForTesting().findViewById(
R.id.onboarding_try_assistant);
assertEquals(
......@@ -205,7 +207,9 @@ public class AssistantOnboardingCoordinatorTest {
TextView termsView = mBottomSheetController.getBottomSheetViewForTesting().findViewById(
R.id.onboarding_subtitle);
assertEquals(View.GONE, termsView.getVisibility());
assertEquals(
mActivity.getResources().getText(R.string.autofill_assistant_init_message_short),
termsView.getText());
TextView titleView = mBottomSheetController.getBottomSheetViewForTesting().findViewById(
R.id.onboarding_try_assistant);
assertEquals(mActivity.getResources().getText(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment