SUW: Redesign Welcome page based on Pixel
Change-Id: I2080c4d22fd5d0af1b1060f86ce1be0b7469757c
This commit is contained in:
@@ -16,33 +16,10 @@
|
|||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="512dp"
|
android:width="512dp"
|
||||||
android:height="320dp"
|
android:height="260dp"
|
||||||
android:viewportWidth="512"
|
android:viewportWidth="512"
|
||||||
android:viewportHeight="320">
|
android:viewportHeight="260">
|
||||||
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/lineage_accent"
|
|
||||||
android:pathData="M157.89,271.64a1.83,1.83,0,0,1-1.89-1.89V248.42h4.65v19.32H171v3.9Z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/lineage_accent"
|
|
||||||
android:pathData="M185,271.64V248.42h4.68v23.22Z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/lineage_accent"
|
|
||||||
android:pathData="M221.17,248.42h4.26v22a1.23,1.23,0,0,1-.67,1.09,3.17,3.17,0,0,1-1.67 .41
|
|
||||||
,4,4,0,0,1-1.71-.29,3.11,3.11,0,0,1-1.12-1L210,256v15.61h-4.32v-21.5a1.56,1.56,0,0,1,.68-1.4,3.18,3.18,0,0,1,1.79-.46,3.59,3.59,0,0,1,1.9
|
|
||||||
.39 ,5.91,5.91,0,0,1,1.41,1.56l9.72,13.59Z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/lineage_accent"
|
|
||||||
android:pathData="M256.9,252.36H246.2v5.5h9.63v3.93H246.2v5.89H256.6v4H241.51V250.31a1.74,1.74,0,0,1,.59-1.37,2,2,0,0,1,1.4-.52h13.4Z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/lineage_accent"
|
|
||||||
android:pathData="M286.38,271.64l-2-5.76h-8.49l-2,5.76h-4.85l7.87-21.5q.68-1.85,3.15-1.85t3.19,1.89l7.87,21.46ZM277.27,262h5.82l-2.93-8.62Z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/lineage_accent"
|
|
||||||
android:pathData="M314.33,272a11,11,0,0,1-8.36-3.19,11.93,11.93,0,0,1-3.06-8.62,12.12,12.12,0,0,1,3.25-8.89,11.56,11.56,0,0,1,8.62-3.3,11.44,11.44,0,0,1,6,1.5,9,9,0,0,1,3.63,3.93l-3.74,2q-1.69-3.41-6-3.41a6.53,6.53,0,0,0-5.14,2.16,8.58,8.58,0,0,0-1.92,5.9,8.67,8.67,0,0,0,1.79,5.8,6.11,6.11,0,0,0,4.91,2.1,6.74,6.74,0,0,0,4.6-1.58,5.26,5.26,0,0,0,1.87-4h-5.89v-3.67h10.5v2.57a10.19,10.19,0,0,1-3.12,7.72A11.12,11.12,0,0,1,314.33,272Z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="@color/lineage_accent"
|
|
||||||
android:pathData="M356,252.36H345.3v5.5h9.63v3.93H345.3v5.89h10.41v4H340.62V250.31a1.74,1.74,0,0,1,.59-1.37,2,2,0,0,1,1.4-.52H356Z" />
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="@color/lineage_accent"
|
android:fillColor="@color/lineage_accent"
|
||||||
android:pathData="M416,128a39.92,39.92,0,0,0-31.11,14.87l-1.5-.6A294.79,294.79,0,0,0,336,128.14s0-.09,0-.14a80,80,0,1,0-160,0s0,.09,0,.13l-1.72
|
android:pathData="M416,128a39.92,39.92,0,0,0-31.11,14.87l-1.5-.6A294.79,294.79,0,0,0,336,128.14s0-.09,0-.14a80,80,0,1,0-160,0s0,.09,0,.13l-1.72
|
||||||
|
@@ -34,20 +34,29 @@
|
|||||||
android:id="@+id/brand_logo"
|
android:id="@+id/brand_logo"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="80"
|
android:layout_weight="65"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/logo"
|
android:src="@drawable/logo"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="@dimen/content_margin_left" />
|
android:paddingTop="@dimen/content_margin_left"
|
||||||
|
android:paddingRight="@dimen/content_margin_left"
|
||||||
|
android:paddingLeft="@dimen/content_margin_left"
|
||||||
|
android:paddingBottom="0dp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="20"
|
android:layout_weight="35"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
style="@style/WelcomeTitle"
|
||||||
|
android:id="@+id/welcome_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hyphenationFrequency="none" />
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/start"
|
android:id="@+id/start"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@@ -23,60 +23,92 @@
|
|||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:paddingTop="@dimen/welcome_content_container_padding_top">
|
||||||
android:layout_height="match_parent"
|
|
||||||
style="@style/SudContentFrame">
|
<ImageView
|
||||||
|
android:id="@+id/brand_logo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/logo" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
style="@style/SudContentFrame"
|
||||||
android:layout_height="0dp"
|
android:layout_width="fill_parent"
|
||||||
android:layout_weight="1"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:layout_gravity="bottom"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="@dimen/welcome_content_container_padding_start"
|
||||||
|
android:paddingEnd="@dimen/welcome_content_container_padding_end"
|
||||||
|
android:paddingBottom="@dimen/welcome_content_container_padding_bottom">
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/brand_logo"
|
style="@style/WelcomeTitle"
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/welcome_title"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/logo"
|
android:hyphenationFrequency="none"
|
||||||
android:adjustViewBounds="true"
|
android:paddingBottom="@dimen/welcome_content_container_padding_bottom" />
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="@dimen/content_margin_left" />
|
|
||||||
|
|
||||||
<Button
|
<LinearLayout
|
||||||
android:id="@+id/start"
|
android:layout_width="fill_parent"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:animateLayoutChanges="true"
|
||||||
android:text="@string/start"
|
android:focusableInTouchMode="true"
|
||||||
style="@style/SudGlifButton.Primary" />
|
android:importantForAccessibility="no"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/launch_accessibility"
|
||||||
|
style="@style/SudGlifButton.Secondary"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:drawableStart="@drawable/ic_eye"
|
||||||
|
android:gravity="start|center"
|
||||||
|
android:drawablePadding="@dimen/welcome_content_container_padding_end"
|
||||||
|
android:textSize="@dimen/welcome_accessibility_text_size"
|
||||||
|
android:textColor="?android:textColorPrimary"
|
||||||
|
android:text="@string/accessibility_settings" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
style="@style/SudGlifButtonBar.Stackable"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:layout_gravity="bottom">
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/emerg_dialer"
|
android:id="@+id/emerg_dialer"
|
||||||
|
style="@style/SudGlifButton.Secondary"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawableTop="@drawable/ic_dialer"
|
android:text="@string/emergency_call" />
|
||||||
android:text="@string/emergency_call"
|
|
||||||
style="@style/SudGlifButton.Secondary" />
|
<Space
|
||||||
|
android:layout_width="0.0dip"
|
||||||
|
android:layout_height="0.0dip"
|
||||||
|
android:layout_weight="1.0" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/launch_accessibility"
|
android:id="@id/start"
|
||||||
|
style="@style/SudGlifButton.Primary"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawableTop="@drawable/ic_eye"
|
android:text="@string/start" />
|
||||||
android:text="@string/accessibility_settings"
|
|
||||||
style="@style/SudGlifButton.Secondary" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.google.android.setupdesign.GlifLayout>
|
</com.google.android.setupdesign.GlifLayout>
|
||||||
|
@@ -16,4 +16,6 @@
|
|||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="base_margin_top">56dp</dimen>
|
<dimen name="base_margin_top">56dp</dimen>
|
||||||
|
<dimen name="content_margin_left">16dp</dimen>
|
||||||
|
<dimen name="welcome_title_padding_bottom">30dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -37,4 +37,14 @@
|
|||||||
<dimen name="setup_line_spacing">3sp</dimen>
|
<dimen name="setup_line_spacing">3sp</dimen>
|
||||||
<dimen name="min_locale_picker_height">100dp</dimen>
|
<dimen name="min_locale_picker_height">100dp</dimen>
|
||||||
<dimen name="base_margin_top">0dp</dimen>
|
<dimen name="base_margin_top">0dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="welcome_content_container_padding_top">100dp</dimen>
|
||||||
|
<dimen name="welcome_content_container_padding_bottom">30dp</dimen>
|
||||||
|
<dimen name="welcome_content_container_padding_end">24dp</dimen>
|
||||||
|
<dimen name="welcome_content_container_padding_start">40dp</dimen>
|
||||||
|
<dimen name="welcome_title_text_size">56sp</dimen>
|
||||||
|
<dimen name="welcome_title_padding_bottom">16dp</dimen>
|
||||||
|
<dimen name="welcome_title_line_height">64dp</dimen>
|
||||||
|
<dimen name="welcome_accessibility_text_size">20sp</dimen>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
<string name="setup_complete">Setup is complete</string>
|
<string name="setup_complete">Setup is complete</string>
|
||||||
<string name="setup_welcome">Welcome</string>
|
<string name="setup_welcome">Welcome</string>
|
||||||
|
<string name="setup_welcome_message">Welcome to <xliff:g id="name" example="LineageOS">%1$s</xliff:g></string>
|
||||||
<string name="setup_locale">Language</string>
|
<string name="setup_locale">Language</string>
|
||||||
<string name="setup_wifi">Select Wi-Fi</string>
|
<string name="setup_wifi">Select Wi-Fi</string>
|
||||||
<string name="setup_sim_missing">SIM card missing</string>
|
<string name="setup_sim_missing">SIM card missing</string>
|
||||||
|
@@ -47,4 +47,12 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="NoDisplay" parent="@android:style/Theme.NoDisplay" />
|
<style name="NoDisplay" parent="@android:style/Theme.NoDisplay" />
|
||||||
|
|
||||||
|
<style name="WelcomeTitle">
|
||||||
|
<item name="android:textSize">@dimen/welcome_title_text_size</item>
|
||||||
|
<item name="android:textColor">?android:textColorPrimary</item>
|
||||||
|
<item name="android:gravity">start</item>
|
||||||
|
<item name="android:paddingBottom">@dimen/welcome_title_padding_bottom</item>
|
||||||
|
<item name="android:lineHeight">@dimen/welcome_title_line_height</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -21,6 +21,7 @@ import android.os.Bundle;
|
|||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.google.android.setupcompat.template.FooterButtonStyleUtils;
|
import com.google.android.setupcompat.template.FooterButtonStyleUtils;
|
||||||
import com.google.android.setupcompat.util.SystemBarHelper;
|
import com.google.android.setupcompat.util.SystemBarHelper;
|
||||||
@@ -47,6 +48,10 @@ public class WelcomeActivity extends BaseSetupWizardActivity {
|
|||||||
|
|
||||||
FooterButtonStyleUtils.applyPrimaryButtonPartnerResource(this, startButton, true);
|
FooterButtonStyleUtils.applyPrimaryButtonPartnerResource(this, startButton, true);
|
||||||
FooterButtonStyleUtils.applySecondaryButtonPartnerResource(this, emergButton, true);
|
FooterButtonStyleUtils.applySecondaryButtonPartnerResource(this, emergButton, true);
|
||||||
|
|
||||||
|
TextView welcomeTitle = findViewById(R.id.welcome_title);
|
||||||
|
welcomeTitle.setText(getString(R.string.setup_welcome_message,
|
||||||
|
getString(R.string.os_name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user