OLD | NEW |
1 <?xml version="1.0" encoding="utf-8"?> | 1 <?xml version="1.0" encoding="utf-8"?> |
2 <!-- Copyright 2015 The Chromium Authors. All rights reserved. | 2 <!-- Copyright 2015 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 <org.chromium.chrome.browser.widget.PaddedFrameLayout | 6 <org.chromium.chrome.browser.preferences.datareduction.DataReductionPromoView |
7 xmlns:android="http://schemas.android.com/apk/res/android" | 7 xmlns:android="http://schemas.android.com/apk/res/android" |
8 xmlns:chrome="http://schemas.android.com/apk/res-auto" | 8 xmlns:chrome="http://schemas.android.com/apk/res-auto" |
9 android:background="#c000" | 9 android:background="#c000" > |
10 chrome:maxChildHeight="@dimen/data_reduction_promo_screen_height" | |
11 chrome:maxChildWidth="@dimen/data_reduction_promo_screen_width"> | |
12 | 10 |
13 <ScrollView | 11 <ScrollView |
14 android:layout_height="match_parent" | 12 android:layout_height="match_parent" |
15 android:layout_width="match_parent" | 13 android:layout_width="match_parent" |
16 android:fillViewport="true"> | 14 android:fillViewport="true"> |
17 | 15 |
18 <RelativeLayout | 16 <RelativeLayout |
19 android:layout_height="wrap_content" | 17 android:layout_height="wrap_content" |
20 android:layout_width="match_parent" | 18 android:layout_width="match_parent" |
21 android:background="#FFFF" > | 19 android:background="#FFFF" > |
22 | 20 |
23 <org.chromium.chrome.browser.widget.TintedImageButton | 21 <org.chromium.chrome.browser.widget.TintedImageButton |
24 android:id="@+id/close_button" | 22 android:id="@+id/close_button" |
25 android:layout_height="56dp" | 23 android:layout_height="56dp" |
26 android:layout_width="56dp" | 24 android:layout_width="56dp" |
27 android:layout_alignParentEnd="true" | 25 android:layout_alignParentEnd="true" |
28 android:layout_alignParentTop="true" | 26 android:layout_alignParentTop="true" |
29 android:background="?android:attr/selectableItemBackground" | 27 android:background="?android:attr/selectableItemBackground" |
30 android:contentDescription="@string/close" | 28 android:contentDescription="@string/close" |
31 android:src="@drawable/btn_close" /> | 29 android:src="@drawable/btn_close" /> |
32 | 30 |
33 <LinearLayout | 31 <LinearLayout |
34 android:id="@+id/data_reduction_promo_text" | 32 android:id="@+id/data_reduction_promo_content" |
35 android:layout_height="wrap_content" | 33 android:layout_height="wrap_content" |
36 android:layout_width="match_parent" | 34 android:layout_width="match_parent" |
37 android:layout_below="@+id/close_button" | 35 android:layout_below="@+id/close_button" |
38 android:layout_marginTop="16dp" | 36 android:layout_marginTop="16dp" |
39 android:orientation="vertical" | |
40 android:paddingEnd="24dp" | 37 android:paddingEnd="24dp" |
41 android:paddingStart="24dp" > | 38 android:paddingStart="24dp" > |
42 | 39 |
43 <ImageView | 40 <ImageView |
| 41 android:id="@+id/data_reduction_illustration" |
44 android:layout_height="wrap_content" | 42 android:layout_height="wrap_content" |
45 android:layout_width="wrap_content" | 43 android:layout_width="wrap_content" |
46 android:layout_gravity="center_horizontal" | 44 android:layout_gravity="center_horizontal" |
47 android:layout_marginBottom="@dimen/data_reduction_promo_ill
ustration_margin_bottom" | |
48 android:adjustViewBounds="true" | 45 android:adjustViewBounds="true" |
49 android:contentDescription="@null" | 46 android:contentDescription="@null" |
50 android:src="@drawable/data_reduction_illustration" /> | 47 android:src="@drawable/data_reduction_illustration" /> |
| 48 |
| 49 <LinearLayout |
| 50 android:id="@+id/text_wrapper" |
| 51 android:layout_height="wrap_content" |
| 52 android:layout_width="wrap_content" |
| 53 android:orientation="vertical" > |
51 | 54 |
52 <TextView | 55 <TextView |
53 android:layout_height="wrap_content" | 56 android:layout_height="wrap_content" |
54 android:layout_width="match_parent" | 57 android:layout_width="match_parent" |
55 android:layout_marginBottom="8dp" | 58 android:layout_marginBottom="8dp" |
56 android:text="@string/data_reduction_promo_title" | 59 android:text="@string/data_reduction_promo_title" |
57 android:textColor="@color/default_text_color" | 60 android:textColor="@color/default_text_color" |
58 android:textSize="@dimen/data_reduction_promo_title_text_siz
e" /> | 61 android:textSize="@dimen/data_reduction_promo_title_text
_size" /> |
59 | 62 |
60 <TextView | 63 <TextView |
61 android:layout_height="wrap_content" | 64 android:layout_height="wrap_content" |
62 android:layout_width="match_parent" | 65 android:layout_width="match_parent" |
63 android:lineSpacingMultiplier="1.3" | 66 android:lineSpacingMultiplier="1.3" |
64 android:text="@string/data_reduction_promo_summary" | 67 android:text="@string/data_reduction_promo_summary" |
65 android:textColor="#646464" | 68 android:textColor="#646464" |
66 android:textSize="@dimen/data_reduction_promo_normal_text_si
ze" /> | 69 android:textSize="@dimen/data_reduction_promo_normal_tex
t_size" /> |
| 70 </LinearLayout> |
67 </LinearLayout> | 71 </LinearLayout> |
68 | 72 |
69 <FrameLayout | 73 <FrameLayout |
70 android:layout_height="wrap_content" | 74 android:layout_height="wrap_content" |
71 android:layout_width="match_parent" | 75 android:layout_width="match_parent" |
72 android:layout_alignParentBottom="true" | 76 android:layout_alignParentBottom="true" |
73 android:layout_below="@id/data_reduction_promo_text" > | 77 android:layout_below="@id/data_reduction_promo_content" > |
74 | 78 |
75 <!-- The FrameLayout must have layout_below so that the buttons
don't | 79 <!-- The FrameLayout must have layout_below so that the buttons
don't |
76 overlap the text. This causes the FrameLayout to extend fro
m | 80 overlap the text. This causes the FrameLayout to extend fro
m |
77 data_reduction_promo_text to the bottom of the RelativeLayo
ut. | 81 data_reduction_promo_text to the bottom of the RelativeLayo
ut. |
78 In order for the buttons to adjust their height when the sc
reen | 82 In order for the buttons to adjust their height when the sc
reen |
79 size causes multiple lines of text, but not be the size of
the | 83 size causes multiple lines of text, but not be the size of
the |
80 empty space between the text and bottom of the promo we nee
d | 84 empty space between the text and bottom of the promo we nee
d |
81 this second LinearLayout. --> | 85 this second LinearLayout. --> |
82 <LinearLayout | 86 <LinearLayout |
83 android:layout_height="wrap_content" | 87 android:layout_height="wrap_content" |
(...skipping 22 matching lines...) Expand all Loading... |
106 android:elevation="0dp" | 110 android:elevation="0dp" |
107 android:minHeight="40dp" | 111 android:minHeight="40dp" |
108 android:text="@string/data_reduction_enable_button" | 112 android:text="@string/data_reduction_enable_button" |
109 android:textColor="#FFFFFF" | 113 android:textColor="#FFFFFF" |
110 android:textSize="@dimen/data_reduction_promo_button_tex
t_size" | 114 android:textSize="@dimen/data_reduction_promo_button_tex
t_size" |
111 chrome:buttonColor="@color/light_active_color" /> | 115 chrome:buttonColor="@color/light_active_color" /> |
112 </LinearLayout> | 116 </LinearLayout> |
113 </FrameLayout> | 117 </FrameLayout> |
114 </RelativeLayout> | 118 </RelativeLayout> |
115 </ScrollView> | 119 </ScrollView> |
116 </org.chromium.chrome.browser.widget.PaddedFrameLayout> | 120 </org.chromium.chrome.browser.preferences.datareduction.DataReductionPromoView> |
OLD | NEW |