diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-04-28 19:04:58 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-04-30 16:26:23 +0000 |
| commit | 638114b618ffa9ea871401a77f02594198c854bd (patch) | |
| tree | f9db63db9fd8285e44430ee9063ab660f31337a6 | |
| parent | 224ff2d0df3e1d5dfb22063acab805d2485034d7 (diff) | |
| download | mullvadvpn-638114b618ffa9ea871401a77f02594198c854bd.tar.xz mullvadvpn-638114b618ffa9ea871401a77f02594198c854bd.zip | |
Create Welcome screen for newly created accounts
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WelcomeFragment.kt | 14 | ||||
| -rw-r--r-- | android/src/main/res/layout/welcome.xml | 88 | ||||
| -rw-r--r-- | android/src/main/res/values/strings.xml | 6 |
3 files changed, 108 insertions, 0 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WelcomeFragment.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WelcomeFragment.kt new file mode 100644 index 0000000000..37acf130a2 --- /dev/null +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/WelcomeFragment.kt @@ -0,0 +1,14 @@ +package net.mullvad.mullvadvpn.ui + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.ViewGroup +import net.mullvad.mullvadvpn.R + +class WelcomeFragment : ServiceDependentFragment(OnNoService.GoToLaunchScreen) { + override fun onSafelyCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ) = inflater.inflate(R.layout.welcome, container, false) +} diff --git a/android/src/main/res/layout/welcome.xml b/android/src/main/res/layout/welcome.xml new file mode 100644 index 0000000000..88e8c5d39c --- /dev/null +++ b/android/src/main/res/layout/welcome.xml @@ -0,0 +1,88 @@ +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:mullvad="http://schemas.android.com/apk/res-auto" + android:id="@+id/main_fragment" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + <LinearLayout android:id="@+id/header_bar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="0" + android:orientation="horizontal" + android:gravity="center_vertical" + android:background="@color/red" + android:elevation="0.5dp"> + <ImageView android:layout_width="50dp" + android:layout_height="50dp" + android:layout_marginLeft="12dp" + android:layout_marginVertical="12dp" + android:layout_weight="0" + android:src="@drawable/logo_icon" /> + <TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginHorizontal="8dp" + android:layout_marginVertical="12dp" + android:layout_weight="1" + android:textColor="@color/white80" + android:textSize="24sp" + android:textStyle="bold" + android:text="@string/app_name" + android:textAllCaps="true" /> + <ImageButton android:id="@+id/settings" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_weight="0" + android:paddingHorizontal="12dp" + android:background="?android:attr/selectableItemBackground" + android:src="@drawable/icon_settings" /> + </LinearLayout> + <TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginHorizontal="24dp" + android:layout_marginTop="24dp" + android:textColor="@color/white" + android:textSize="32sp" + android:textStyle="bold" + android:text="@string/congrats" /> + <TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginHorizontal="24dp" + android:layout_marginTop="8dp" + android:layout_marginBottom="11dp" + android:textColor="@color/white" + android:textSize="13sp" + android:text="@string/here_is_your_account_number" /> + <TextView android:id="@+id/account_number" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginHorizontal="24dp" + android:layout_marginVertical="11dp" + android:textColor="@color/white" + android:textSize="24sp" + android:textStyle="bold" + android:text="" /> + <TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginHorizontal="24dp" + android:layout_marginTop="11dp" + android:textColor="@color/white" + android:textSize="13sp" + android:text="@string/pay_to_start_using" /> + <Space android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" /> + <LinearLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="0" + android:orientation="vertical" + android:padding="24dp" + android:background="@color/darkBlue"> + <net.mullvad.mullvadvpn.ui.widget.UrlButton android:id="@+id/buy_credit" + android:layout_width="match_parent" + android:layout_height="wrap_content" + mullvad:buttonColor="green" + mullvad:text="@string/buy_credit" + mullvad:url="@string/account_url" + mullvad:withToken="true" /> + </LinearLayout> +</LinearLayout> diff --git a/android/src/main/res/values/strings.xml b/android/src/main/res/values/strings.xml index ff70bf0730..a2d06c83cc 100644 --- a/android/src/main/res/values/strings.xml +++ b/android/src/main/res/values/strings.xml @@ -32,6 +32,12 @@ <string name="creating_new_account">Creating new account</string> <string name="failed_to_create_account">Failed to create account</string> <string name="account_created">Account created</string> + <string name="congrats">Congrats!</string> + <string name="here_is_your_account_number">Here\'s your account number. + Save it!</string> + <string name="pay_to_start_using">To start using the app, you first need + to add time to you account. Buy credit on our website.</string> + <string name="buy_credit">Buy credit</string> <string name="settings">Settings</string> <string name="settings_account">Account</string> <string name="less_than_a_day_left">less than a day |
