<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2023 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:importantForAccessibility="no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/autofill_bottom_sheet_drag_handlebar_spacing_top"
android:src="@drawable/drag_handlebar"
app:tint="@macro/drag_handlebar_color" />
<ScrollView
android:id="@+id/autofill_save_card_scroll_view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/autofill_bottom_sheet_padding_horizontal"
android:paddingRight="@dimen/autofill_bottom_sheet_padding_horizontal"
android:layout_marginTop="@dimen/autofill_bottom_sheet_spacing_extra_small">
<ImageView
android:id="@+id/autofill_save_card_icon"
android:importantForAccessibility="no"
android:layout_width="match_parent"
android:layout_height="@dimen/autofill_bottom_sheet_logo_height"
android:layout_marginTop="@dimen/autofill_bottom_sheet_spacing_medium"
tools:src="@drawable/google_pay" />
<TextView
android:id="@+id/autofill_save_card_title_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/autofill_bottom_sheet_title_top_margin"
tools:text="Save Card?"
android:textAppearance="@style/TextAppearance.Headline.Primary"
android:textAlignment="center" />
<org.chromium.ui.widget.TextViewWithLeading
android:id="@+id/autofill_save_card_description_text"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginTop="@dimen/autofill_bottom_sheet_spacing_extra_small"
app:leading="@dimen/text_size_medium_leading"
tools:text="To pay faster next time, save your card and billing address to your Google Account."
android:textAppearance="@style/TextAppearance.TextMedium.Secondary"
android:textAlignment="center" />
<RelativeLayout
android:id="@+id/autofill_credit_card_chip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/autofill_bottom_sheet_chip_top_margin"
android:padding="@dimen/autofill_bottom_sheet_credit_card_spacing"
android:background="@drawable/autofill_save_card_credit_card_surface"
android:descendantFocusability="blocksDescendants"
android:importantForAccessibility="yes">
<!-- A content description will be set by the view class for the whole
chip, and children will not be focusable to avoid redundant
information. -->
<ImageView
android:id="@+id/autofill_save_card_credit_card_icon"
android:layout_width="@dimen/autofill_bottom_sheet_credit_card_width"
android:layout_height="@dimen/autofill_bottom_sheet_credit_card_height"
android:layout_centerVertical="true"
android:importantForAccessibility="no" />
<TextView
android:id="@+id/autofill_save_card_credit_card_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.TextMedium.Primary"
android:layout_marginStart="@dimen/autofill_bottom_sheet_credit_card_spacing"
android:layout_toEndOf="@id/autofill_save_card_credit_card_icon"
tools:text="Bobpay 1234" />
<TextView
android:id="@+id/autofill_save_card_credit_card_sublabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.TextMedium.Primary"
android:layout_below="@+id/autofill_save_card_credit_card_label"
android:layout_marginStart="@dimen/autofill_bottom_sheet_credit_card_spacing"
android:layout_toEndOf="@id/autofill_save_card_credit_card_icon"
tools:text="08 / 29" />
</RelativeLayout>
<org.chromium.ui.widget.TextViewWithClickableSpans
android:id="@+id/legal_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/autofill_bottom_sheet_spacing_medium"
app:leading="@dimen/text_size_small_leading"
tools:text="By continuing, you agree to the Google Payments Terms of Service. The Privacy Notice describes how your data is handled."
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.TextSmall.Secondary"/>
<org.chromium.ui.widget.ButtonCompat
android:id="@+id/autofill_save_card_confirm_button"
style="@style/FilledButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_marginTop="@dimen/autofill_bottom_sheet_confirm_button_top_margin"
android:minHeight="@dimen/min_touch_target_size"
android:minWidth="@dimen/min_touch_target_size"
tools:text="Save" />
<org.chromium.ui.widget.ButtonCompat
android:id="@+id/autofill_save_card_cancel_button"
style="@style/TextButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_marginTop="@dimen/autofill_bottom_sheet_spacing_extra_small"
android:layout_marginBottom="@dimen/autofill_bottom_sheet_spacing_extra_small"
android:minHeight="@dimen/min_touch_target_size"
android:minWidth="@dimen/min_touch_target_size"
tools:text="No Thanks" />
<!-- The FrameLayout here is to facilitate adding a proper content
description for the loading view. If the content description is added
directly to the loading view, it will be read as
"zero percent <content description> progress bar". -->
<!-- TODO(crbug.com/40718855): Remove frame layout and move content
description to the loading view after the bug is resolved. -->
<FrameLayout
android:id="@+id/autofill_save_card_loading_view_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/autofill_bottom_sheet_confirm_button_top_margin"
android:layout_marginBottom="@dimen/autofill_bottom_sheet_loading_view_bottom_margin"
android:accessibilityLiveRegion="1"
android:visibility="gone">
<org.chromium.ui.widget.LoadingView
android:id="@+id/autofill_save_card_loading_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
</FrameLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>