blob: 08c735693c44dccb28e539e4fdcbdbfadf73027d [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<org.chromium.chrome.browser.firstrun.FirstRunView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:chrome="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/fre_button_bar_height"
android:fillViewport="true">
<LinearLayout
android:id="@+id/fre_main_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal">
<TextView
android:id="@+id/title"
android:text="@string/data_reduction_promo_title"
style="@style/FreTitle"/>
<!-- The orientation of this view is changed dynamically to give a nicer layout when in
landscape mode on devices with small screens. -->
<LinearLayout
android:id="@+id/fre_image_and_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:layout_marginTop="@dimen/fre_vertical_spacing">
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="@dimen/fre_image_height"
android:contentDescription="@null"
android:src="@drawable/data_reduction_illustration" />
<LinearLayout
android:id="@+id/fre_content_wrapper"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginTop="@dimen/fre_vertical_spacing"
android:layout_marginEnd="@dimen/fre_content_margin"
android:layout_marginStart="@dimen/fre_content_margin"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/fre_vertical_spacing"
android:gravity="start"
android:lineSpacingMultiplier="1.4"
android:text="@string/data_reduction_promo_summary"
android:textColor="@color/fre_text_color"
android:textSize="@dimen/fre_normal_text_size" />
<android.support.v7.widget.SwitchCompat
android:id="@+id/enable_data_saver_switch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingMultiplier="1.4"
android:showText="false"
android:text="@string/data_reduction_enabled_switch"
android:textColor="@color/fre_text_color"
android:textSize="@dimen/fre_normal_text_size"
android:fontFamily="sans-serif-medium" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
<!-- fre_button_bar_height = 52dp = layout_height + layout_marginBottom -->
<org.chromium.ui.widget.ButtonCompat
android:id="@+id/next_button"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginBottom="16dp"
android:layout_gravity="bottom|center_horizontal"
android:paddingStart="@dimen/fre_button_padding"
android:paddingEnd="@dimen/fre_button_padding"
android:text="@string/next"
android:textAllCaps="true"
android:textColor="@android:color/white"
android:textSize="@dimen/fre_button_text_size"
chrome:buttonColor="@color/light_active_color"
chrome:buttonRaised="false"/>
</org.chromium.chrome.browser.firstrun.FirstRunView>