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 <!-- This XML should not be inflated by anything except PromoDialog.java. | 6 <!-- This XML should not be inflated by anything except PromoDialog.java. |
7 | 7 |
8 This layout is deeply nested to account for the various bits having to flop
orientations | 8 This layout is deeply nested to account for the various bits having to flop
orientations |
9 in landscape. If these become more frequently used, we should investigate
optimizing the | 9 in landscape. If these become more frequently used, we should investigate
optimizing the |
10 layout. | 10 layout. |
11 --> | 11 --> |
12 <merge xmlns:android="http://schemas.android.com/apk/res/android" | 12 <merge xmlns:android="http://schemas.android.com/apk/res/android" |
13 xmlns:chrome="http://schemas.android.com/apk/res-auto" > | 13 xmlns:chrome="http://schemas.android.com/apk/res-auto" > |
14 | 14 |
15 <org.chromium.chrome.browser.widget.PromoDialogLayout | 15 <org.chromium.chrome.browser.widget.PromoDialogLayout |
16 android:id="@+id/promo_dialog_layout" | 16 android:id="@+id/promo_dialog_layout" |
17 android:layout_width="wrap_content" | 17 android:layout_width="wrap_content" |
18 android:layout_height="wrap_content" | 18 android:layout_height="wrap_content" |
19 android:layout_gravity="center" | 19 android:layout_gravity="center" |
20 android:orientation="vertical" | 20 android:orientation="vertical" |
21 android:background="@drawable/menu_bg" | 21 android:background="@drawable/menu_bg" |
22 chrome:maxWidth="@dimen/promo_dialog_max_width" > | 22 chrome:maxWidth="@dimen/promo_dialog_max_width" > |
23 | 23 |
24 <org.chromium.chrome.browser.widget.FadingEdgeScrollView | 24 <org.chromium.chrome.browser.widget.FadingEdgeScrollView |
25 android:id="@+id/promo_container" | 25 android:id="@+id/promo_container" |
26 android:layout_width="wrap_content" | 26 android:layout_width="wrap_content" |
27 android:layout_height="0dp" | 27 android:layout_height="0dp" |
28 android:layout_weight="1" > | 28 android:layout_weight="1" |
| 29 android:fadeScrollbars="false" > |
29 | 30 |
30 <!-- This layout pivots when the dialog is wider than it is tall. --
> | 31 <!-- This layout pivots when the dialog is wider than it is tall. --
> |
31 <LinearLayout | 32 <LinearLayout |
32 android:id="@+id/promo_content" | 33 android:id="@+id/full_promo_content" |
33 android:layout_width="wrap_content" | 34 android:layout_width="wrap_content" |
34 android:layout_height="wrap_content" | 35 android:layout_height="wrap_content" |
35 android:padding="@dimen/promo_dialog_padding" | 36 android:padding="@dimen/promo_dialog_padding" |
36 android:gravity="center" | 37 android:gravity="center" |
37 android:orientation="vertical" > | 38 android:orientation="vertical" > |
38 | 39 |
39 <ImageView | 40 <ImageView |
40 android:id="@+id/illustration" | 41 android:id="@+id/illustration" |
41 android:layout_width="@dimen/promo_dialog_illustration_w
idth" | 42 android:layout_width="@dimen/promo_dialog_illustration_w
idth" |
42 android:layout_height="wrap_content" | 43 android:layout_height="wrap_content" |
43 android:layout_gravity="center" | 44 android:layout_gravity="center" |
44 android:layout_margin="@dimen/promo_dialog_illustration_
margin" | 45 android:layout_marginTop="@dimen/promo_dialog_illustrati
on_margin" |
| 46 android:layout_marginStart="@dimen/promo_dialog_illustra
tion_margin" |
| 47 android:layout_marginEnd="@dimen/promo_dialog_illustrati
on_margin" |
45 android:scaleType="fitCenter" | 48 android:scaleType="fitCenter" |
46 android:contentDescription="@null" /> | 49 android:contentDescription="@null" /> |
47 | 50 |
48 <org.chromium.chrome.browser.widget.BoundedLinearLayout | 51 <org.chromium.chrome.browser.widget.BoundedLinearLayout |
| 52 android:id="@+id/scrollable_promo_content" |
49 android:layout_width="wrap_content" | 53 android:layout_width="wrap_content" |
50 android:layout_height="wrap_content" | 54 android:layout_height="wrap_content" |
51 android:orientation="vertical" | 55 android:orientation="vertical" |
52 chrome:maxWidth="@dimen/promo_dialog_max_content_width"
> | 56 chrome:maxWidth="@dimen/promo_dialog_max_content_width"
> |
53 | 57 |
54 <TextView | 58 <TextView |
55 android:id="@+id/header" | 59 android:id="@+id/header" |
56 android:layout_width="wrap_content" | 60 android:layout_width="wrap_content" |
57 android:layout_height="wrap_content" | 61 android:layout_height="wrap_content" |
58 android:layout_marginBottom="14dp" | 62 android:layout_marginTop="@dimen/dialog_header_margi
n" |
| 63 android:layout_marginBottom="@dimen/dialog_header_ma
rgin" |
59 android:textColor="@color/default_text_color" | 64 android:textColor="@color/default_text_color" |
60 android:textSize="@dimen/promo_dialog_title_text_siz
e" /> | 65 android:textSize="@dimen/promo_dialog_title_text_siz
e" /> |
61 | 66 |
62 <TextView | 67 <TextView |
63 android:id="@+id/subheader" | 68 android:id="@+id/subheader" |
64 android:layout_width="wrap_content" | 69 android:layout_width="wrap_content" |
65 android:layout_height="wrap_content" | 70 android:layout_height="wrap_content" |
66 android:lineSpacingMultiplier="1.3" | 71 android:lineSpacingMultiplier="1.3" |
67 android:textColor="#646464" | 72 android:textColor="#646464" |
68 android:textSize="@dimen/promo_dialog_normal_text_si
ze" /> | 73 android:textSize="@dimen/promo_dialog_normal_text_si
ze" /> |
69 </org.chromium.chrome.browser.widget.BoundedLinearLayout> | 74 </org.chromium.chrome.browser.widget.BoundedLinearLayout> |
70 </LinearLayout> | 75 </LinearLayout> |
71 | 76 |
72 </org.chromium.chrome.browser.widget.FadingEdgeScrollView> | 77 </org.chromium.chrome.browser.widget.FadingEdgeScrollView> |
73 | 78 |
| 79 <ViewStub |
| 80 android:id="@+id/footer_stub" |
| 81 android:layout="@layout/infobar_control_description" |
| 82 android:inflatedId="@+id/footer" |
| 83 android:layout_margin="@dimen/promo_dialog_padding" |
| 84 android:layout_width="wrap_content" |
| 85 android:layout_height="wrap_content" /> |
| 86 |
74 <org.chromium.chrome.browser.widget.DualControlLayout | 87 <org.chromium.chrome.browser.widget.DualControlLayout |
75 android:id="@+id/button_bar" | 88 android:id="@+id/button_bar" |
76 android:layout_width="wrap_content" | 89 android:layout_width="wrap_content" |
77 android:layout_height="wrap_content" | 90 android:layout_height="wrap_content" |
78 android:layout_gravity="end" | 91 android:layout_gravity="end" |
79 android:padding="@dimen/promo_dialog_padding" | 92 android:padding="@dimen/promo_dialog_padding" |
80 chrome:buttonAlignment="end" | 93 chrome:buttonAlignment="end" |
81 chrome:stackedMargin="@dimen/infobar_padding" /> | 94 chrome:stackedMargin="@dimen/infobar_padding" /> |
82 | 95 |
83 </org.chromium.chrome.browser.widget.PromoDialogLayout> | 96 </org.chromium.chrome.browser.widget.PromoDialogLayout> |
84 | 97 |
85 </merge> | 98 </merge> |
OLD | NEW |