Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3770)

Unified Diff: chrome/android/java/res/layout/tabular_context_menu_page.xml

Issue 2777773002: Show the image header for the Context Menu (Closed)
Patch Set: Why be public when you can be private Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/res/layout/tabular_context_menu_page.xml
diff --git a/chrome/android/java/res/layout/tabular_context_menu_page.xml b/chrome/android/java/res/layout/tabular_context_menu_page.xml
index fcf462960b64322e86f16e82a25fa787d33a4864..a3d7a7b2df3108676969137b4085bc9fe4763da9 100644
--- a/chrome/android/java/res/layout/tabular_context_menu_page.xml
+++ b/chrome/android/java/res/layout/tabular_context_menu_page.xml
@@ -2,27 +2,50 @@
<!-- 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. -->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content_layer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="280dp"
android:orientation="vertical">
- <TextView
- android:id="@+id/context_header_text"
+ <LinearLayout
+ android:id="@+id/context_header_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
- android:layout_marginBottom="10dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
- android:gravity="center"
- android:maxLines="1"
- android:textSize="13sp"
- android:textStyle="bold"
- android:ellipsize="end"
- android:visibility="gone"/>
+ android:layout_marginBottom="10dp"
+ android:layout_gravity="center"
+ android:orientation="vertical"
+ tools:ignore="UseCompoundDrawables">
+ <!-- Cannot use a compound drawable since it does not allow a change in maxHeight and
+ background to the image. -->
+ <ImageView
+ android:id="@+id/context_header_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:contentDescription="@null"
+ android:foreground="@drawable/tabular_context_menu_image_border"
+ android:minWidth="@dimen/context_menu_header_image_min_size"
+ android:minHeight="@dimen/context_menu_header_image_min_size"
+ android:maxWidth="@dimen/context_menu_header_image_max_size"
+ android:maxHeight="@dimen/context_menu_header_image_max_size"
+ android:adjustViewBounds="true"
+ android:visibility="gone"/>
+ <TextView
+ android:id="@+id/context_header_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:maxLines="1"
+ android:textSize="13sp"
+ android:textStyle="bold"
+ android:ellipsize="end"
+ android:visibility="gone"/>
+ </LinearLayout>
<View
android:id="@+id/context_divider"
android:layout_width="match_parent"

Powered by Google App Engine
This is Rietveld 408576698