OLD | NEW |
---|---|
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 xmlns:android="http://schemas.android.com/apk/res/android" | 5 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
6 xmlns:tools="http://schemas.android.com/tools" | 6 xmlns:tools="http://schemas.android.com/tools" |
7 android:id="@+id/context_menu_row" | |
7 android:orientation="horizontal" | 8 android:orientation="horizontal" |
8 android:layout_width="match_parent" | 9 android:layout_width="match_parent" |
9 android:layout_height="wrap_content" | 10 android:layout_height="wrap_content" |
10 android:paddingStart="15dp" | |
11 android:paddingEnd="15dp" | |
12 android:minHeight="40dp" | 11 android:minHeight="40dp" |
13 tools:ignore="UseCompoundDrawables"> | 12 tools:ignore="UseCompoundDrawables"> |
14 <ImageView | 13 <ImageView |
15 android:id="@+id/context_menu_icon" | 14 android:id="@+id/context_menu_icon" |
16 android:layout_width="20dp" | 15 android:layout_width="20dp" |
17 android:layout_height="20dp" | 16 android:layout_height="20dp" |
17 android:layout_marginTop="10dp" | |
18 android:layout_marginBottom="10dp" | |
18 android:layout_gravity="center_vertical" | 19 android:layout_gravity="center_vertical" |
19 android:contentDescription="@null" /> | 20 android:contentDescription="@null" /> |
20 <TextView | 21 <TextView |
21 android:id="@+id/context_text" | 22 android:id="@+id/context_text" |
22 android:layout_width="0dp" | 23 android:layout_width="0dp" |
23 android:layout_height="wrap_content" | 24 android:layout_height="wrap_content" |
24 android:layout_gravity="center_vertical" | 25 android:layout_gravity="center_vertical" |
25 android:layout_marginStart="10dp" | 26 android:layout_marginStart="10dp" |
Ted C
2017/05/02 16:51:37
I think you should also add 15dp marginEnd here.
ltian
2017/05/02 18:52:28
Done.
| |
26 android:layout_weight="1" | 27 android:layout_weight="1" |
27 android:textSize="15sp" | 28 android:textSize="15sp" |
28 android:textColor="#dd000000" /> | 29 android:textColor="#dd000000" /> |
29 <ImageView | 30 <ImageView |
30 android:id="@+id/context_menu_share_icon" | 31 android:id="@+id/context_menu_share_icon" |
31 android:layout_width="20dp" | 32 android:layout_width="24dp" |
32 android:layout_height="20dp" | 33 android:layout_height="24dp" |
34 android:layout_marginTop="8dp" | |
Ted C
2017/05/02 16:51:37
do you want margin or padding? Margin is likely r
ltian
2017/05/02 18:52:28
Sorry I just learn that padding is clickable while
| |
35 android:layout_marginBottom="8dp" | |
36 android:layout_marginEnd="15dp" | |
Ted C
2017/05/02 16:51:37
according to the spec, you also need 12dp start pa
ltian
2017/05/02 18:52:28
Done.
| |
33 android:layout_gravity="center_vertical" | 37 android:layout_gravity="center_vertical" |
34 android:contentDescription="@null" | 38 android:contentDescription="@null" |
35 android:visibility="gone"/> | 39 android:visibility="gone"/> |
36 </LinearLayout> | 40 </LinearLayout> |
OLD | NEW |