summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-06-21 14:43:42 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-06-24 14:33:00 +0000
commit5ea3bf22fbf36cc6dedfba842f81b5afb5c1c24a (patch)
treec1c3e959d5539b6dc602425f9091eb5dee660beb /android/src
parent70779ba7aa7aa41a24558f99698d8b106a4ec457 (diff)
downloadmullvadvpn-5ea3bf22fbf36cc6dedfba842f81b5afb5c1c24a.tar.xz
mullvadvpn-5ea3bf22fbf36cc6dedfba842f81b5afb5c1c24a.zip
Create Send without e-mail confirmation dialog
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ConfirmNoEmailDialogFragment.kt24
-rw-r--r--android/src/main/res/drawable/dialog_background.xml8
-rw-r--r--android/src/main/res/layout/confirm_no_email.xml29
-rw-r--r--android/src/main/res/values/strings.xml6
4 files changed, 67 insertions, 0 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ConfirmNoEmailDialogFragment.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ConfirmNoEmailDialogFragment.kt
new file mode 100644
index 0000000000..1d205d08ab
--- /dev/null
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ConfirmNoEmailDialogFragment.kt
@@ -0,0 +1,24 @@
+package net.mullvad.mullvadvpn
+
+import android.app.Dialog
+import android.graphics.drawable.ColorDrawable
+import android.os.Bundle
+import android.support.v4.app.DialogFragment
+import android.view.LayoutInflater
+import android.view.ViewGroup
+
+class ConfirmNoEmailDialogFragment : DialogFragment() {
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ) = inflater.inflate(R.layout.confirm_no_email, container, false)
+
+ override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
+ val dialog = super.onCreateDialog(savedInstanceState)
+
+ dialog.window.setBackgroundDrawable(ColorDrawable(android.R.color.transparent))
+
+ return dialog
+ }
+}
diff --git a/android/src/main/res/drawable/dialog_background.xml b/android/src/main/res/drawable/dialog_background.xml
new file mode 100644
index 0000000000..1dbad0d9b1
--- /dev/null
+++ b/android/src/main/res/drawable/dialog_background.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle"
+ >
+ <corners android:radius="11dp"/>
+ <solid android:color="@color/darkBlue"/>
+</shape>
diff --git a/android/src/main/res/layout/confirm_no_email.xml b/android/src/main/res/layout/confirm_no_email.xml
new file mode 100644
index 0000000000..dc6561e530
--- /dev/null
+++ b/android/src/main/res/layout/confirm_no_email.xml
@@ -0,0 +1,29 @@
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:background="@drawable/dialog_background"
+ android:orientation="vertical"
+ android:gravity="left"
+ android:elevation="2dp"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:layout_marginBottom="12dp"
+ android:textColor="@color/white80"
+ android:textSize="16sp"
+ android:text="@string/confirm_no_email"
+ />
+ <Button android:id="@+id/send_button"
+ android:text="@string/send_anyway"
+ style="@style/GreenButton"
+ />
+ <Button android:id="@+id/back_button"
+ android:layout_marginTop="16dp"
+ android:text="@string/back"
+ style="@style/RedButton"
+ />
+</LinearLayout>
diff --git a/android/src/main/res/values/strings.xml b/android/src/main/res/values/strings.xml
index b0087e1942..a3da5d4e96 100644
--- a/android/src/main/res/values/strings.xml
+++ b/android/src/main/res/values/strings.xml
@@ -36,6 +36,12 @@
<string name="sending">Sending...</string>
<string name="sent">Sent</string>
<string name="failed_to_send">Failed to send</string>
+ <string name="confirm_no_email">
+ You are about to send the problem report without a way for us to get back to you. If you
+ want an answer to your report you will have to enter an email address.
+ </string>
+ <string name="send_anyway">Send anyway</string>
+ <string name="back">Back</string>
<string name="sent_thanks">Thanks! We will look into this.</string>
<string name="sent_contact">If needed we will contact you on</string>
<string name="failed_to_send_details">