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.widget.PaddedFrameLayout |
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" | 10 chrome:maxChildHeight="@dimen/data_reduction_promo_screen_height" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 android:layout_alignParentTop="true" | 28 android:layout_alignParentTop="true" |
29 android:background="?android:attr/selectableItemBackground" | 29 android:background="?android:attr/selectableItemBackground" |
30 android:contentDescription="@string/close" | 30 android:contentDescription="@string/close" |
31 android:src="@drawable/btn_close" /> | 31 android:src="@drawable/btn_close" /> |
32 | 32 |
33 <LinearLayout | 33 <LinearLayout |
34 android:id="@+id/data_reduction_promo_text" | 34 android:id="@+id/data_reduction_promo_text" |
35 android:layout_height="wrap_content" | 35 android:layout_height="wrap_content" |
36 android:layout_width="match_parent" | 36 android:layout_width="match_parent" |
37 android:layout_below="@+id/close_button" | 37 android:layout_below="@+id/close_button" |
38 android:layout_marginTop="8dp" | 38 android:layout_marginTop="16dp" |
39 android:orientation="vertical" | 39 android:orientation="vertical" |
40 android:paddingEnd="24dp" | 40 android:paddingEnd="24dp" |
41 android:paddingStart="24dp" > | 41 android:paddingStart="24dp" > |
42 | 42 |
43 <ImageView | 43 <ImageView |
44 android:layout_height="wrap_content" | 44 android:layout_height="wrap_content" |
45 android:layout_width="match_parent" | 45 android:layout_width="wrap_content" |
46 android:layout_marginBottom="24dp" | 46 android:layout_gravity="center_horizontal" |
47 android:layout_marginBottom="30dp" | |
47 android:adjustViewBounds="true" | 48 android:adjustViewBounds="true" |
48 android:contentDescription="@null" | 49 android:contentDescription="@null" |
49 android:gravity="center" | |
50 android:src="@drawable/data_reduction_illustration" /> | 50 android:src="@drawable/data_reduction_illustration" /> |
51 | 51 |
52 <TextView | 52 <TextView |
53 android:layout_height="wrap_content" | 53 android:layout_height="wrap_content" |
54 android:layout_width="match_parent" | 54 android:layout_width="match_parent" |
55 android:layout_marginBottom="8dp" | 55 android:layout_marginBottom="8dp" |
56 android:text="@string/data_reduction_promo_title" | 56 android:text="@string/data_reduction_promo_title" |
57 android:textColor="@color/default_text_color" | 57 android:textColor="@color/default_text_color" |
58 android:textSize="@dimen/data_reduction_promo_title_text_siz e" /> | 58 android:textSize="@dimen/data_reduction_promo_title_text_siz e" /> |
59 | 59 |
60 <TextView | 60 <TextView |
61 android:layout_height="wrap_content" | 61 android:layout_height="wrap_content" |
62 android:layout_width="match_parent" | 62 android:layout_width="match_parent" |
63 android:lineSpacingMultiplier="1.3" | 63 android:lineSpacingMultiplier="1.3" |
64 android:text="@string/data_reduction_promo_summary" | 64 android:text="@string/data_reduction_promo_summary" |
65 android:textColor="#646464" | 65 android:textColor="#646464" |
66 android:textSize="@dimen/data_reduction_promo_normal_text_si ze" /> | 66 android:textSize="@dimen/data_reduction_promo_normal_text_si ze" /> |
67 </LinearLayout> | 67 </LinearLayout> |
68 | 68 |
69 <LinearLayout | 69 <LinearLayout |
newt (away)
2015/09/03 23:11:23
Change to FrameLayout, which is simpler than Linea
newt (away)
2015/09/03 23:43:46
Oddly, gravity="bottom" on the FrameLayout doesn't
newt (away)
2015/09/03 23:57:47
Last thought: another way to fix this, and perhaps
megjablon
2015/09/04 00:06:45
For now lets keep it as is. I'd like to get this l
| |
70 android:layout_height="wrap_content" | 70 android:layout_height="wrap_content" |
71 android:layout_width="match_parent" | 71 android:layout_width="match_parent" |
72 android:layout_alignParentBottom="true" | 72 android:layout_alignParentBottom="true" |
73 android:layout_below="@id/data_reduction_promo_text" | 73 android:layout_below="@id/data_reduction_promo_text" |
74 android:padding="16dp" | 74 android:padding="16dp" |
newt (away)
2015/09/03 23:11:23
move the padding and clipToPadding attributes to t
megjablon
2015/09/04 00:06:45
Done.
| |
75 android:clipToPadding="false" | 75 android:clipToPadding="false" |
76 android:gravity="end|bottom" | 76 android:gravity="end|bottom" > |
newt (away)
2015/09/03 23:11:23
remove "end" since it has no effect.
megjablon
2015/09/04 00:06:45
Done.
| |
77 android:orientation="horizontal" > | 77 <LinearLayout |
newt (away)
2015/09/03 18:07:44
Why the nested LinearLayout? You should be able to
megjablon
2015/09/03 18:47:53
The first linear layout has to have layout_below s
newt (away)
2015/09/03 23:11:23
Ah. Right. I played with this a bit. Seems like wh
megjablon
2015/09/04 00:06:45
Done.
| |
78 <org.chromium.ui.widget.ButtonCompat | |
79 android:id="@+id/no_thanks_button" | |
80 android:layout_height="wrap_content" | 78 android:layout_height="wrap_content" |
81 android:layout_width="wrap_content" | 79 android:layout_width="match_parent" |
82 android:layout_marginEnd="8dp" | 80 android:gravity="end|bottom" |
newt (away)
2015/09/03 23:11:23
remove "bottom" since it has no effect
megjablon
2015/09/04 00:06:45
Done.
| |
83 android:minHeight="40dp" | 81 android:orientation="horizontal" > |
84 android:text="@string/no_thanks" | 82 <org.chromium.ui.widget.ButtonCompat |
85 android:textColor="@color/light_normal_color" | 83 android:id="@+id/no_thanks_button" |
86 android:textSize="@dimen/data_reduction_promo_button_text_si ze" | 84 android:layout_height="match_parent" |
87 chrome:buttonColor="#FFFFFF" /> | 85 android:layout_width="wrap_content" |
88 <org.chromium.ui.widget.ButtonCompat | 86 android:layout_marginEnd="8dp" |
newt (away)
2015/09/03 23:43:46
Also add layout_weight="1" to each of the buttons.
megjablon
2015/09/04 00:06:45
Done.
| |
89 android:id="@+id/enable_button" | 87 android:minHeight="40dp" |
90 android:layout_height="wrap_content" | 88 android:text="@string/no_thanks" |
91 android:layout_width="wrap_content" | 89 android:textColor="@color/light_normal_color" |
92 android:minHeight="40dp" | 90 android:textSize="@dimen/data_reduction_promo_button_tex t_size" |
93 android:text="@string/data_reduction_enable_button" | 91 chrome:buttonColor="#FFFFFF" /> |
94 android:textColor="#FFFFFF" | 92 <org.chromium.ui.widget.ButtonCompat |
95 android:textSize="@dimen/data_reduction_promo_button_text_si ze" | 93 android:id="@+id/enable_button" |
96 chrome:buttonColor="@color/light_active_color" /> | 94 android:layout_height="wrap_content" |
newt (away)
2015/09/03 18:07:44
This should be match_parent too, in case the first
megjablon
2015/09/03 18:47:53
Done.
| |
95 android:layout_width="wrap_content" | |
96 android:minHeight="40dp" | |
97 android:text="@string/data_reduction_enable_button" | |
98 android:textColor="#FFFFFF" | |
99 android:textSize="@dimen/data_reduction_promo_button_tex t_size" | |
100 chrome:buttonColor="@color/light_active_color" /> | |
101 </LinearLayout> | |
97 </LinearLayout> | 102 </LinearLayout> |
98 </RelativeLayout> | 103 </RelativeLayout> |
99 </ScrollView> | 104 </ScrollView> |
100 </org.chromium.chrome.browser.widget.PaddedFrameLayout> | 105 </org.chromium.chrome.browser.widget.PaddedFrameLayout> |
OLD | NEW |