chromium/components/messages/android/internal/java/res/layout/message_banner_view.xml

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<org.chromium.components.messages.MessageBannerView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/message_banner"
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:minHeight="@dimen/message_banner_height"
    android:layout_gravity="center_horizontal"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    android:layout_marginTop="@dimen/message_shadow_top_margin"
    android:layout_marginBottom="@dimen/message_shadow_bottom_margin"
    android:layout_marginStart="@dimen/message_shadow_lateral_margin"
    android:layout_marginEnd="@dimen/message_shadow_lateral_margin"
    android:elevation="@dimen/message_banner_elevation"
    app:maxWidthPortrait="@dimen/message_max_width"
    app:maxWidthLandscape="@dimen/message_max_width"
    android:background="@drawable/message_bg_tinted">

    <ImageView
        android:id="@+id/message_icon"
        app:tint="@macro/default_icon_color_accent1"
        android:layout_marginHorizontal="@dimen/message_icon_margin"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/message_icon_size"
        android:scaleType="fitCenter"
        android:adjustViewBounds="true"
        android:importantForAccessibility="no" />

    <LinearLayout
        android:id="@+id/message_main_content"
        android:animateLayoutChanges="true"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:gravity="center_vertical"
        android:layout_gravity="center_vertical"
        android:orientation="vertical"
        android:layout_height="wrap_content"
        android:paddingTop="@dimen/message_banner_vertical_padding"
        android:paddingBottom="@dimen/message_banner_vertical_padding">

        <TextView
            android:id="@+id/message_title"
            style="@style/TextAppearance.TextLarge.Primary"
            android:textDirection="locale"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
        <org.chromium.components.browser_ui.widget.text.TextViewWithCompoundDrawables
            android:id="@+id/message_description"
            style="@style/TextAppearance.TextSmall.Secondary"
            android:visibility="gone"
            android:breakStrategy="simple"
            android:textDirection="locale"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:drawablePadding="@dimen/message_description_icon_padding"
            app:drawableWidth="@dimen/message_description_icon_size"
            app:drawableHeight="@dimen/message_description_icon_size"/>
    </LinearLayout>

    <!--  Content description is set programmatically according to secondary button icon. -->
    <org.chromium.ui.listmenu.ListMenuButton
        android:id="@+id/message_secondary_button"
        app:tint="@macro/default_icon_color_secondary"
        app:menuVerticalOverlapAnchor="false"
        android:visibility="gone"
        android:contentDescription="@null"
        android:accessibilityTraversalAfter="@id/message_primary_button"
        android:background="?actionBarItemBackground"
        android:layout_width="@dimen/min_touch_target_size"
        android:layout_height="@dimen/min_touch_target_size" />

    <ImageView
        android:id="@+id/message_divider"
        android:layout_marginTop="@dimen/message_divider_margin"
        android:layout_marginBottom="@dimen/message_divider_margin"
        android:background="@macro/divider_line_bg_color"
        android:visibility="gone"
        android:importantForAccessibility="no"
        android:layout_width="1dp"
        android:layout_height="24dp" />

    <org.chromium.ui.widget.ButtonCompat
        style="@style/TextButton"
        android:id="@+id/message_primary_button"
        app:verticalInset="0dp"
        app:rippleCornerRadiusTopStart="0dp"
        app:rippleCornerRadiusBottomStart="0dp"
        app:rippleCornerRadiusBottomEnd="@dimen/message_banner_radius"
        app:rippleCornerRadiusTopEnd="@dimen/message_banner_radius"
        android:maxWidth="@dimen/message_primary_button_max_width"
        android:minWidth="@dimen/button_min_width"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:visibility="gone" />

</org.chromium.components.messages.MessageBannerView>