blob: 70365568aac91e2b33af15ed8f49c2b80435de05 [file]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 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. -->
<!-- We used nested LinearLayouts here because it was harder to align the text vertically with
the center of the image using a single RelativeLayout. A ConstraintLayout could be a better
choice here, but it isn't available to us, yet -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingStart="16dp"
android:paddingEnd="16dp" >
<ImageView
android:id="@+id/menu_header_image"
android:layout_width="@dimen/revamped_context_menu_header_image_max_size"
android:layout_height="@dimen/revamped_context_menu_header_image_max_size"
android:layout_gravity="top|start"
android:src="@drawable/checkerboard_background"
android:scaleType="fitCenter"
android:importantForAccessibility="no" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:layout_gravity="center_vertical">
<TextView
android:id="@+id/menu_header_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.BlackCaptionDefault"/>
<TextView
android:id="@+id/menu_header_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.BlackCaption"/>
</LinearLayout>
</LinearLayout>