| <?xml version="1.0" encoding="utf-8"?> |
| <!-- Copyright 2017 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. --> |
| |
| <!-- This XML should not be inflated by anything except PromoDialog.java. |
| |
| This layout is deeply nested to account for the various bits having to flop orientations |
| in landscape. If these become more frequently used, we should investigate optimizing the |
| layout. |
| --> |
| <merge |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
| xmlns:tools="http://schemas.android.com/tools"> |
| |
| <org.chromium.chrome.browser.widget.PromoDialogLayout |
| android:id="@+id/promo_dialog_layout" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_gravity="center" |
| android:orientation="vertical" |
| android:background="@drawable/popup_bg_tinted" |
| app:maxWidthLandscape="@dimen/dialog_max_width" |
| app:maxWidthPortrait="@dimen/dialog_max_width" > |
| |
| <org.chromium.chrome.browser.widget.FadingEdgeScrollView |
| android:id="@+id/promo_container" |
| android:layout_width="match_parent" |
| android:layout_height="0dp" |
| android:layout_weight="1" |
| android:fadeScrollbars="false" > |
| |
| <!-- This layout pivots when the dialog is wider than it is tall. --> |
| <LinearLayout |
| android:id="@+id/full_promo_content" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:padding="@dimen/promo_dialog_padding" |
| android:gravity="center" |
| android:orientation="vertical" > |
| |
| <ImageView |
| android:id="@+id/illustration" |
| android:layout_width="@dimen/promo_dialog_illustration_width" |
| android:layout_height="wrap_content" |
| android:layout_gravity="center" |
| android:paddingTop="@dimen/promo_dialog_illustration_margin" |
| android:layout_marginStart="@dimen/promo_dialog_illustration_margin" |
| android:layout_marginEnd="@dimen/promo_dialog_illustration_margin" |
| android:scaleType="fitCenter" |
| tools:ignore="ContentDescription" /> |
| |
| <org.chromium.chrome.browser.widget.BoundedLinearLayout |
| android:id="@+id/scrollable_promo_content" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:orientation="vertical" |
| app:maxWidthLandscape="@dimen/promo_dialog_max_content_width" |
| app:maxWidthPortrait="@dimen/promo_dialog_max_content_width" > |
| |
| <TextView |
| android:id="@+id/header" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/dialog_header_margin" |
| android:layout_marginBottom="@dimen/dialog_header_margin" |
| android:textAppearance="@style/TextAppearance.BlackHeadline" /> |
| |
| <TextView |
| android:id="@+id/subheader" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| style="@style/PromoDialogNormalText" /> |
| </org.chromium.chrome.browser.widget.BoundedLinearLayout> |
| </LinearLayout> |
| |
| </org.chromium.chrome.browser.widget.FadingEdgeScrollView> |
| |
| <ViewStub |
| android:id="@+id/footer_stub" |
| android:layout="@layout/infobar_control_description" |
| android:inflatedId="@+id/footer" |
| android:layout_margin="@dimen/promo_dialog_padding" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" /> |
| |
| <org.chromium.chrome.browser.widget.DualControlLayout |
| android:id="@+id/button_bar" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_gravity="end" |
| android:padding="@dimen/promo_dialog_padding" |
| app:buttonAlignment="end" |
| app:stackedMargin="@dimen/infobar_padding" /> |
| |
| </org.chromium.chrome.browser.widget.PromoDialogLayout> |
| |
| </merge> |