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

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: 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..0470d9c8e4b593a25b8d6468420d3082f4c19f9a 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,48 @@
<!-- 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">
JJ 2017/03/27 00:38:54 For those who are curious on why we're doing this:
Theresa 2017/03/27 18:28:26 It would be good to capture this in a comment in t
JJ 2017/03/27 20:47:12 Done.
+ <ImageView
+ android:id="@+id/context_header_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:contentDescription="@string/context_menu_header_image_default_desc_text"
+ android:foreground="@drawable/tabular_context_menu_image_border"
+ android:minWidth="56dp"
+ android:minHeight="56dp"
+ 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