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

Side by Side Diff: chrome/android/java/res/layout/tabular_context_menu_page.xml

Issue 2777773002: Show the image header for the Context Menu (Closed)
Patch Set: Fixed based off twellington's comments 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 unified diff | Download patch
OLDNEW
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright 2017 The Chromium Authors. All rights reserved. 2 <!-- Copyright 2017 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. --> 4 found in the LICENSE file. -->
5 <LinearLayout 5 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
6 xmlns:android="http://schemas.android.com/apk/res/android" 6 xmlns:tools="http://schemas.android.com/tools"
7 android:id="@+id/content_layer" 7 android:id="@+id/content_layer"
8 android:layout_width="match_parent" 8 android:layout_width="match_parent"
9 android:layout_height="match_parent" 9 android:layout_height="match_parent"
10 android:minWidth="280dp" 10 android:minWidth="280dp"
11 android:orientation="vertical"> 11 android:orientation="vertical">
12 <TextView 12 <LinearLayout
13 android:id="@+id/context_header_text" 13 android:id="@+id/context_header_layout"
14 android:layout_width="match_parent" 14 android:layout_width="match_parent"
15 android:layout_height="wrap_content" 15 android:layout_height="wrap_content"
16 android:layout_marginTop="20dp" 16 android:layout_marginTop="20dp"
17 android:layout_marginBottom="10dp"
18 android:layout_marginStart="20dp" 17 android:layout_marginStart="20dp"
19 android:layout_marginEnd="20dp" 18 android:layout_marginEnd="20dp"
20 android:gravity="center" 19 android:layout_marginBottom="10dp"
21 android:maxLines="1" 20 android:layout_gravity="center"
22 android:textSize="13sp" 21 android:orientation="vertical"
23 android:textStyle="bold" 22 tools:ignore="UseCompoundDrawables">
24 android:ellipsize="end" 23 <!-- Cannot use a compound drawable since it does not allow a good chang e in maxHeight and
Theresa 2017/03/28 17:23:08 Does it allow a hacky change?
JJ 2017/03/28 23:19:20 The hackiest of changes. (You'd have to measure th
25 android:visibility="gone"/> 24 background to the image. -->
25 <ImageView
26 android:id="@+id/context_header_image"
27 android:layout_width="wrap_content"
28 android:layout_height="wrap_content"
29 android:layout_gravity="center"
30 android:contentDescription="@string/context_menu_header_image_defaul t_desc_text"
31 android:foreground="@drawable/tabular_context_menu_image_border"
32 android:minWidth="56dp"
33 android:minHeight="56dp"
Theresa 2017/03/28 17:23:08 Should this be defined in dimens.xml as context_me
JJ 2017/03/28 23:19:20 Why not.
34 android:maxWidth="@dimen/context_menu_header_image_max_size"
35 android:maxHeight="@dimen/context_menu_header_image_max_size"
36 android:adjustViewBounds="true"
37 android:visibility="gone"/>
38 <TextView
39 android:id="@+id/context_header_text"
40 android:layout_width="match_parent"
41 android:layout_height="wrap_content"
42 android:gravity="center"
43 android:maxLines="1"
44 android:textSize="13sp"
45 android:textStyle="bold"
46 android:ellipsize="end"
47 android:visibility="gone"/>
48 </LinearLayout>
26 <View 49 <View
27 android:id="@+id/context_divider" 50 android:id="@+id/context_divider"
28 android:layout_width="match_parent" 51 android:layout_width="match_parent"
29 android:layout_height="1dp" 52 android:layout_height="1dp"
30 android:background="#1e000000"/> 53 android:background="#1e000000"/>
31 <ListView 54 <ListView
32 android:id="@+id/selectable_items" 55 android:id="@+id/selectable_items"
33 android:layout_width="match_parent" 56 android:layout_width="match_parent"
34 android:layout_height="wrap_content" 57 android:layout_height="wrap_content"
35 android:paddingTop="8dp" 58 android:paddingTop="8dp"
36 android:paddingBottom="8dp" 59 android:paddingBottom="8dp"
37 android:dividerHeight="0dp" 60 android:dividerHeight="0dp"
38 android:divider="@null"/> 61 android:divider="@null"/>
39 </LinearLayout> 62 </LinearLayout>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698