chromium/chrome/browser/creator/android/java/res/layout/creator_bottomsheet_toolbar.xml

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

<!-- A toolbar layout designed for bottom-sheet based components -->
<LinearLayout
    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"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <View
        android:layout_width="match_parent"
        android:layout_height="@dimen/creator_bottomsheet_toolbar_top_height" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="@dimen/creator_bottomsheet_toolbar_elements_container_height"
        android:paddingStart="@dimen/creator_bottomsheet_toolbar_elements_container_padding"
        android:paddingEnd="@dimen/creator_bottomsheet_toolbar_elements_container_padding">

        <org.chromium.ui.widget.ChromeImageView
            android:id="@+id/favicon"
            android:layout_width="@dimen/creator_bottomsheet_toolbar_favicon_width"
            android:layout_height="@dimen/creator_bottomsheet_toolbar_favicon_height"
            android:layout_centerVertical="true"
            android:layout_marginEnd="@dimen/creator_bottomsheet_toolbar_favicon_marginEnd"
            android:layout_marginBottom="@dimen/creator_bottomsheet_toolbar_favicon_marginBottom"
            android:scaleType="fitCenter"
            android:importantForAccessibility="no" />

        <ImageView
            android:id="@+id/drag_handlebar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal|top"
            android:layout_marginTop="@dimen/creator_bottomsheet_toolbar_drag_handlebar_margin"
            android:layout_centerHorizontal="true"
            android:importantForAccessibility="no"
            android:src="@drawable/drag_handlebar" />

        <org.chromium.ui.widget.ChromeImageView
            android:id="@+id/close"
            android:layout_width="@dimen/creator_bottomsheet_toolbar_icon_width"
            android:layout_height="@dimen/creator_bottomsheet_toolbar_icon_height"
            android:paddingTop="@dimen/creator_bottomsheet_toolbar_icon_padding"
            android:paddingBottom="@dimen/creator_bottomsheet_toolbar_icon_padding"
            android:paddingStart="@dimen/creator_bottomsheet_toolbar_icon_padding"
            android:paddingEnd="@dimen/creator_bottomsheet_toolbar_icon_padding"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:layout_marginBottom="@dimen/creator_bottomsheet_toolbar_icon_marginBottom"
            android:src="@drawable/btn_close"
            android:contentDescription="@string/close"
            app:tint="@macro/default_icon_color" />

        <org.chromium.ui.widget.ChromeImageView
            android:id="@+id/open_in_new_tab"
            android:layout_width="@dimen/creator_bottomsheet_toolbar_icon_width"
            android:layout_height="@dimen/creator_bottomsheet_toolbar_icon_height"
            android:paddingTop="@dimen/creator_bottomsheet_toolbar_icon_padding"
            android:paddingBottom="@dimen/creator_bottomsheet_toolbar_icon_padding"
            android:paddingStart="@dimen/creator_bottomsheet_toolbar_icon_padding"
            android:paddingEnd="@dimen/creator_bottomsheet_toolbar_icon_padding"
            android:layout_toStartOf="@+id/close"
            android:layout_centerVertical="true"
            android:layout_marginBottom="@dimen/creator_bottomsheet_toolbar_icon_marginBottom"
            android:src="@drawable/open_in_new_tab"
            android:contentDescription="@string/contextmenu_open_in_new_tab"
            android:visibility="gone"
            app:tint="@macro/default_icon_color" />

        <RelativeLayout
            android:id="@+id/page_info"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toStartOf="@id/open_in_new_tab"
            android:layout_toEndOf="@id/favicon"
            android:layout_marginBottom="@dimen/creator_bottomsheet_toolbar_page_info_marginBottom"
            android:gravity="center">

            <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/creator_bottomsheet_toolbar_text_margin"
                android:layout_marginEnd="@dimen/creator_bottomsheet_toolbar_text_margin"
                android:textAlignment="viewStart"
                android:ellipsize="end"
                android:singleLine="true"
                android:textAppearance="@style/TextAppearance.TextMedium.Primary" />

            <org.chromium.ui.widget.ChromeImageView
                android:id="@+id/security_icon"
                android:layout_width="@dimen/creator_bottomsheet_toolbar_security_icon_width"
                android:layout_height="@dimen/creator_bottomsheet_toolbar_security_icon_height"
                android:layout_alignStart="@id/title"
                android:layout_below="@id/title"
                android:layout_marginTop="@dimen/creator_bottomsheet_toolbar_security_icon_margin"
                android:importantForAccessibility="no"
                app:tint="@macro/default_icon_color" />

            <TextView
                android:id="@+id/origin"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_toEndOf="@id/security_icon"
                android:layout_below="@id/title"
                android:layout_marginStart="@dimen/creator_bottomsheet_toolbar_text_marginEnd"
                android:textAlignment="viewStart"
                android:ellipsize="start"
                android:singleLine="true"
                android:textAppearance="@style/TextAppearance.TextMedium.Secondary" />
        </RelativeLayout>
    </RelativeLayout>

    <View
        android:layout_width="match_parent"
        android:layout_height="@dimen/creator_bottomsheet_toolbar_bottom_height" />

    <ProgressBar
        android:id="@+id/progress_bar"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="match_parent"
        android:layout_height="@dimen/creator_bottomsheet_toolbar_progressbar_height"
        android:max="100" />

    <org.chromium.components.browser_ui.widget.FadingShadowView
        android:id="@+id/shadow"
        android:layout_width="match_parent"
        android:layout_height="@dimen/action_bar_shadow_height"/>
</LinearLayout>