Experience upgrade splash screen.

Behaves similarly to the DatabaseUpgradeActivity. You have a
static list of ExperienceUpgrade models that include a "trigger"
version, where when a user upgrades through it a notification
will appear, and there will be a splash explanation screen.

Right now the splash screens are basic and not too configurable,
but that can be reworked as upgrades demand.

Closes #4151
This commit is contained in:
Jake McGinty
2015-09-29 13:14:22 -07:00
committed by Moxie Marlinspike
parent 0b20e99cd2
commit 3035dc4df9
16 changed files with 475 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:background="#FF2090ea">
<TextView android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="@+id/blurb"
android:textSize="34sp"
android:textIsSelectable="false"
android:gravity="center_horizontal|bottom"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:fontFamily="sans-serif-light"
tools:text="@string/ExperienceUpgradeActivity_welcome_to_signal"
android:textColor="@android:color/white" />
<ImageView android:id="@+id/watermark"
android:layout_width="@dimen/onboarding_watermark_size"
android:layout_height="0dp"
android:layout_weight="2"
android:maxHeight="@dimen/onboarding_watermark_size"
android:scaleType="fitCenter"
tools:src="@drawable/splash_logo"
android:layout_gravity="center_horizontal"
android:layout_below="@id/blurb"
android:layout_marginBottom="20dp"
android:layout_marginTop="@dimen/onboarding_margin_vert" />
<TextView android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:id="@+id/subblurb"
android:textSize="20sp"
android:textIsSelectable="false"
android:gravity="center_horizontal"
android:layout_marginTop="20dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:fontFamily="sans-serif-light"
tools:text="@string/ExperienceUpgradeActivity_textsecure_is_now_called_signal"
android:textColor="@android:color/white" />
</LinearLayout>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<Button android:id="@+id/continue_button"
android:layout_width="140sp"
android:layout_height="wrap_content"
android:text="continue"
android:visibility="invisible"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
<me.relex.circleindicator.CircleIndicator
android:id="@+id/indicator"
android:layout_gravity="bottom|center_horizontal"
android:layout_width="fill_parent"
android:layout_marginBottom="25dp"
android:clickable="false"
android:focusable="false"
android:layout_height="40dp" />
<com.melnykov.fab.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="25dp"
android:src="@drawable/ic_arrow_forward_white_24dp"
android:focusable="true"
android:contentDescription="@string/conversation_list_fragment__fab_content_description"
fab:fab_shadow="false"
fab:fab_colorNormal="#33000000"
fab:fab_colorPressed="#66000000"
fab:fab_colorRipple="#66000000" />
</FrameLayout>

View File

@@ -1,9 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<color name="textsecure_primary">#ff2090ea</color>
<color name="textsecure_primary_dark">#ff1c7ac5</color>
<color name="signal_primary">#ff2090ea</color>
<color name="signal_primary_dark">#ff1c7ac5</color>
<color name="signal_primary_alpha33">#552090ea</color>
<color name="textsecure_primary_alpha33">#552090ea</color>
<color name="textsecure_primary">@color/signal_primary</color>
<color name="textsecure_primary_dark">@color/signal_primary_dark</color>
<color name="textsecure_primary_alpha33">@color/signal_primary_alpha33</color>
<color name="white">#ffffffff</color>
<color name="black">#ff000000</color>

View File

@@ -55,4 +55,8 @@
holding the phone, *before* moving it up to your face and having
the prox sensor kick in.) -->
<dimen name="button_cluster_side_padding">20dp</dimen>
<dimen name="onboarding_margin_vert">35dp</dimen>
<dimen name="onboarding_margin_land">20dp</dimen>
<dimen name="onboarding_watermark_size">140dp</dimen>
</resources>

View File

@@ -187,6 +187,12 @@
<!-- ShareActivity -->
<string name="ShareActivity_share_with">Share with</string>
<!-- ExperienceUpgradeActivity -->
<string name="ExperienceUpgradeActivity_welcome_to_signal_dgaf">Welcome to Signal.</string>
<string name="ExperienceUpgradeActivity_textsecure_is_now_called_signal">TextSecure and RedPhone are now one private messenger, for every situation: Signal.</string>
<string name="ExperienceUpgradeActivity_welcome_to_signal_excited">Welcome to Signal!</string>
<string name="ExperienceUpgradeActivity_textsecure_is_now_signal">TextSecure is now Signal.</string>
<string name="ExperienceUpgradeActivity_textsecure_is_now_signal_long">TextSecure and RedPhone are now one app: Signal. Tap to explore.</string>
<!-- ExportFragment -->
<string name="ExportFragment_export">Export</string>
<string name="ExportFragment_export_plaintext_to_sd_card">Export plaintext to SD card?</string>