forked from signalapp/Signal-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 signalapp#4151
- Loading branch information
Showing
16 changed files
with
475 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package org.thoughtcrime.securesms; | ||
|
||
import android.os.Bundle; | ||
import android.support.v4.app.Fragment; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.ImageView; | ||
import android.widget.TextView; | ||
|
||
public class BasicIntroFragment extends Fragment { | ||
|
||
private static final String ARG_DRAWABLE = "drawable"; | ||
private static final String ARG_TEXT = "text"; | ||
private static final String ARG_SUBTEXT = "subtext"; | ||
|
||
private int drawable; | ||
private int text; | ||
private int subtext; | ||
|
||
public static BasicIntroFragment newInstance(int drawable, int text, int subtext) { | ||
BasicIntroFragment fragment = new BasicIntroFragment(); | ||
Bundle args = new Bundle(); | ||
args.putInt(ARG_DRAWABLE, drawable); | ||
args.putInt(ARG_TEXT, text); | ||
args.putInt(ARG_SUBTEXT, subtext); | ||
fragment.setArguments(args); | ||
return fragment; | ||
} | ||
|
||
public BasicIntroFragment() {} | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (getArguments() != null) { | ||
drawable = getArguments().getInt(ARG_DRAWABLE); | ||
text = getArguments().getInt(ARG_TEXT ); | ||
subtext = getArguments().getInt(ARG_SUBTEXT ); | ||
} | ||
} | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
View v = inflater.inflate(R.layout.color_fragment, container, false); | ||
|
||
((ImageView)v.findViewById(R.id.watermark)).setImageResource(drawable); | ||
((TextView)v.findViewById(R.id.blurb)).setText(text); | ||
((TextView)v.findViewById(R.id.subblurb)).setText(subtext); | ||
|
||
return v; | ||
} | ||
} |
Oops, something went wrong.