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 | 5 |
6 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 6 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
7 android:layout_width="match_parent" | 7 android:layout_width="match_parent" |
8 android:layout_height="wrap_content" | 8 android:layout_height="wrap_content" |
9 android:orientation="vertical"> | 9 android:orientation="vertical"> |
10 | 10 |
11 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 11 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
12 xmlns:chrome="http://schemas.android.com/apk/res-auto" | 12 xmlns:chrome="http://schemas.android.com/apk/res-auto" |
13 style="@style/AppMenuItem" | 13 style="@style/AppMenuItem" |
14 android:layout_width="match_parent" | 14 android:layout_width="match_parent" |
15 android:layout_height="?android:attr/listPreferredItemHeightSmall" > | 15 android:layout_height="?android:attr/listPreferredItemHeightSmall" > |
16 | 16 |
17 <TextView | |
18 android:id="@+id/menu_item_text" | |
19 android:textAppearance="?android:attr/textAppearanceLargePopupMenu" | |
20 android:layout_width="0dp" | |
mdjones
2017/05/24 16:08:00
Why does this width change to 0?
mdjones
2017/05/24 16:11:49
I guess layout weight determines the width now.
Marti Wong
2017/05/25 00:28:55
Yes, it uses weight to determine the width now.
Ot
| |
21 android:layout_height="match_parent" | |
22 android:layout_weight="1" | |
23 android:layout_gravity="start" | |
24 android:gravity="center_vertical" | |
25 android:singleLine="true" | |
26 android:paddingEnd="16dp" /> | |
17 <org.chromium.chrome.browser.widget.TintedImageView | 27 <org.chromium.chrome.browser.widget.TintedImageView |
18 android:id="@+id/menu_item_icon" | 28 android:id="@+id/menu_item_icon" |
19 android:src="@drawable/ic_check_googblue_24dp" | 29 android:src="@drawable/ic_check_googblue_24dp" |
20 android:layout_width="24dp" | 30 android:layout_width="24dp" |
21 android:layout_height="match_parent" | 31 android:layout_height="match_parent" |
22 android:layout_gravity="end" | 32 android:layout_gravity="end" |
23 android:gravity="center_vertical" | 33 android:gravity="center_vertical" |
24 chrome:tint="@color/dark_mode_tint" /> | 34 chrome:tint="@color/dark_mode_tint" /> |
25 <TextView | |
26 android:id="@+id/menu_item_text" | |
27 android:textAppearance="?android:attr/textAppearanceLargePopupMenu" | |
28 android:layout_width="wrap_content" | |
29 android:layout_height="match_parent" | |
30 android:layout_gravity="start" | |
31 android:gravity="center_vertical" | |
32 android:singleLine="true" | |
33 android:paddingStart="16dp" /> | |
34 | 35 |
35 </LinearLayout> | 36 </LinearLayout> |
36 | 37 |
37 <View | 38 <View |
38 android:id="@+id/menu_item_divider" | 39 android:id="@+id/menu_item_divider" |
39 android:layout_width="match_parent" | 40 android:layout_width="match_parent" |
40 android:layout_height="1dp" | 41 android:layout_height="1dp" |
41 android:background="@color/translate_overflow_menu_divider_color" | 42 android:background="@color/translate_overflow_menu_divider_color" |
42 android:visibility="gone" /> | 43 android:visibility="gone" /> |
43 | 44 |
44 </LinearLayout> | 45 </LinearLayout> |
45 | 46 |
OLD | NEW |