1 <?xml version="1.0" encoding="utf-8"?>
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
4 found in the LICENSE file. -->
6 <org.chromium.chrome.browser.widget.PaddedFrameLayout
7 xmlns:android="http://schemas.android.com/apk/res/android"
8 xmlns:chrome="http://schemas.android.com/apk/res-auto"
9 android:background="#c000"
10 chrome:maxChildHeight="@dimen/data_reduction_promo_screen_height"
11 chrome:maxChildWidth="@dimen/data_reduction_promo_screen_width">
14 android:layout_height="match_parent"
15 android:layout_width="match_parent"
16 android:fillViewport="true">
19 android:layout_height="wrap_content"
20 android:layout_width="match_parent"
21 android:background="#FFFF" >
23 <org.chromium.chrome.browser.widget.TintedImageButton
24 android:id="@+id/close_button"
25 android:layout_height="56dp"
26 android:layout_width="56dp"
27 android:layout_alignParentEnd="true"
28 android:layout_alignParentTop="true"
29 android:background="?android:attr/selectableItemBackground"
30 android:contentDescription="@string/close"
31 android:src="@drawable/btn_close" />
34 android:id="@+id/data_reduction_promo_text"
35 android:layout_height="wrap_content"
36 android:layout_width="match_parent"
37 android:layout_below="@+id/close_button"
38 android:layout_marginTop="16dp"
39 android:orientation="vertical"
40 android:paddingEnd="24dp"
41 android:paddingStart="24dp" >
44 android:layout_height="wrap_content"
45 android:layout_width="wrap_content"
46 android:layout_gravity="center_horizontal"
47 android:layout_marginBottom="@dimen/data_reduction_promo_illustration_margin_bottom"
48 android:adjustViewBounds="true"
49 android:contentDescription="@null"
50 android:src="@drawable/data_reduction_illustration" />
53 android:layout_height="wrap_content"
54 android:layout_width="match_parent"
55 android:layout_marginBottom="8dp"
56 android:text="@string/data_reduction_promo_title"
57 android:textColor="@color/default_text_color"
58 android:textSize="@dimen/data_reduction_promo_title_text_size" />
61 android:layout_height="wrap_content"
62 android:layout_width="match_parent"
63 android:lineSpacingMultiplier="1.3"
64 android:text="@string/data_reduction_promo_summary"
65 android:textColor="#646464"
66 android:textSize="@dimen/data_reduction_promo_normal_text_size" />
70 android:layout_height="wrap_content"
71 android:layout_width="match_parent"
72 android:layout_alignParentBottom="true"
73 android:layout_below="@id/data_reduction_promo_text" >
75 <!-- The FrameLayout must have layout_below so that the buttons don't
76 overlap the text. This causes the FrameLayout to extend from
77 data_reduction_promo_text to the bottom of the RelativeLayout.
78 In order for the buttons to adjust their height when the screen
79 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 need
81 this second LinearLayout. -->
83 android:layout_height="wrap_content"
84 android:layout_width="match_parent"
85 android:layout_gravity="bottom"
86 android:orientation="horizontal"
87 android:clipToPadding="false"
88 android:padding="16dp"
89 android:gravity="end" >
91 <org.chromium.ui.widget.ButtonCompat
92 android:id="@+id/no_thanks_button"
93 android:layout_height="match_parent"
94 android:layout_width="wrap_content"
95 android:layout_marginEnd="8dp"
96 android:layout_weight="1"
97 android:minHeight="40dp"
98 android:text="@string/no_thanks"
99 android:textColor="@color/light_normal_color"
100 android:textSize="@dimen/data_reduction_promo_button_text_size"
101 chrome:buttonColor="#FFFFFF"
102 style="@style/ButtonCompatBorderless" />
104 <org.chromium.ui.widget.ButtonCompat
105 android:id="@+id/enable_button"
106 android:layout_height="match_parent"
107 android:layout_width="wrap_content"
108 android:layout_weight="1"
109 android:elevation="0dp"
110 android:minHeight="40dp"
111 android:text="@string/data_reduction_enable_button"
112 android:textColor="#FFFFFF"
113 android:textSize="@dimen/data_reduction_promo_button_text_size"
114 chrome:buttonColor="@color/light_active_color" />
119 </org.chromium.chrome.browser.widget.PaddedFrameLayout>