aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/res
diff options
context:
space:
mode:
authorDaniel Gultsch <inputmice@siacs.eu>2015-01-02 01:21:14 +0100
committerDaniel Gultsch <inputmice@siacs.eu>2015-01-02 01:21:14 +0100
commit3833e6dfef8c7a06982ad7783f89c28d27d83bfe (patch)
treef8cbad96e63401728a2a760435ce90db99481abb /src/main/res
parentb71740f0d40ed3fb3e5b790d80ed6cb235f97d04 (diff)
improved OTR verification part one
Diffstat (limited to '')
-rw-r--r--src/main/res/layout/activity_verify_otr.xml334
-rw-r--r--src/main/res/values/strings.xml7
2 files changed, 153 insertions, 188 deletions
diff --git a/src/main/res/layout/activity_verify_otr.xml b/src/main/res/layout/activity_verify_otr.xml
index 73539e0e..28e5e5ed 100644
--- a/src/main/res/layout/activity_verify_otr.xml
+++ b/src/main/res/layout/activity_verify_otr.xml
@@ -1,189 +1,147 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="@color/secondarybackground">
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <TextView
- android:id="@+id/error_no_session"
- android:layout_margin="16dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/no_otr_session_found"
- android:layout_gravity="center_horizontal"
- android:textColor="@color/primarytext"
- android:textSize="?attr/TextSizeBody"
- />
- <RelativeLayout
- android:id="@+id/verification_area_one"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="@drawable/infocard_border"
- android:layout_margin="8dp">
- <LinearLayout
- android:id="@+id/fingerprint_area"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="16dp"
- android:orientation="vertical">
- <TextView
- android:id="@+id/remote_jid"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/primarytext"
- android:textSize="?attr/TextSizeHeadline"/>
- <TextView
- android:layout_marginTop="16dp"
- android:id="@+id/your_fingerprint"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/primarytext"
- android:textSize="?attr/TextSizeBody"
- android:typeface="monospace" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/secondarytext"
- android:textSize="?attr/TextSizeInfo"
- android:text="@string/your_fingerprint"/>
- <TextView
- android:layout_marginTop="16dp"
- android:id="@+id/remote_fingerprint"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/primarytext"
- android:textSize="?attr/TextSizeBody"
- android:typeface="monospace" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/secondarytext"
- android:textSize="?attr/TextSizeInfo"
- android:text="@string/remote_fingerprint"/>
- </LinearLayout>
- <LinearLayout
- android:layout_below="@+id/fingerprint_area"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true" >
-
- <Button
- android:id="@+id/button_show_qr_code"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/show_qr_code"/>
-
- <View
- android:layout_width="1dp"
- android:layout_height="fill_parent"
- android:layout_marginBottom="7dp"
- android:layout_marginTop="7dp"
- android:background="@color/divider" />
-
- <Button
- android:id="@+id/button_scan_qr_code"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/scan_qr_code"
- android:textColor="@color/primarytext" />
- </LinearLayout>
- </RelativeLayout>
- <RelativeLayout
- android:id="@+id/verification_area_two"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:background="@drawable/infocard_border">
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:id="@+id/shared_secret_box"
- android:padding="16dp">
- <TextView
- android:text="@string/smp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/primarytext"
- android:textSize="?attr/TextSizeHeadline"
- android:layout_marginBottom="16dp"
- />
- <TextView
- android:id="@+id/status_message"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/verified"
- android:layout_gravity="center_horizontal"
- android:textSize="?attr/TextSizeHeadline"
- android:textStyle="bold"
- android:visibility="gone"/>
- <EditText
- android:id="@+id/shared_secret_hint"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:inputType="textAutoComplete"
- android:hint="@string/shared_secret_hint"
- android:textColor="@color/primarytext"
- android:textColorHint="@color/secondarytext"
- android:textSize="?attr/TextSizeBody"
- android:layout_marginBottom="8dp"/>
- <EditText
- android:id="@+id/shared_secret_secret"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/shared_secret_secret"
- android:inputType="textPassword"
- android:textColor="@color/primarytext"
- android:textColorHint="@color/secondarytext"
- android:textSize="?attr/TextSizeBody" />
- </LinearLayout>
- <LinearLayout
- android:layout_below="@+id/shared_secret_box"
- android:id="@+id/button_bar"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true" >
-
- <Button
- android:id="@+id/button_shared_secret_negative"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:enabled="false"
- android:text="@string/cancel"
- android:textColor="@color/secondarytext"/>
-
- <View
- android:layout_width="1dp"
- android:layout_height="fill_parent"
- android:layout_marginBottom="7dp"
- android:layout_marginTop="7dp"
- android:background="@color/divider" />
-
- <Button
- android:id="@+id/button_shared_secret_positive"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/create"
- android:textColor="@color/primarytext" />
- </LinearLayout>
- </RelativeLayout>
- </LinearLayout>
-</ScrollView> \ No newline at end of file
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/primarybackground">
+
+ <ScrollView
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_above="@+id/button_bar">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="16dp">
+
+ <TextView
+ android:id="@+id/verification_explanation"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+
+ <LinearLayout
+ android:id="@+id/manual_verification_area"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="16dp"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/your_fingerprint"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/primarytext"
+ android:textSize="?attr/TextSizeBody"
+ android:typeface="monospace"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/your_fingerprint"
+ android:textColor="@color/secondarytext"
+ android:textSize="?attr/TextSizeInfo"/>
+
+ <TextView
+ android:id="@+id/remote_fingerprint"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="20dp"
+ android:textColor="@color/primarytext"
+ android:textSize="?attr/TextSizeBody"
+ android:typeface="monospace"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="20dp"
+ android:text="@string/remote_fingerprint"
+ android:textColor="@color/secondarytext"
+ android:textSize="?attr/TextSizeInfo"/>
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/smp_verification_area"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_marginTop="16dp"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/status_message"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/verified"
+ android:textColor="@color/primarytext"
+ android:textSize="?attr/TextSizeHeadline"
+ android:textStyle="bold"
+ android:visibility="gone"/>
+
+ <TextView
+ android:id="@+id/shared_secret_hint"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:textColor="@color/primarytext"
+ android:textSize="?attr/TextSizeBody"
+ android:textStyle="bold"
+ android:visibility="gone"/>
+
+ <EditText
+ android:id="@+id/shared_secret_hint_editable"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:hint="@string/shared_secret_hint"
+ android:inputType="textAutoComplete"
+ android:textColor="@color/primarytext"
+ android:textColorHint="@color/secondarytext"
+ android:textSize="?attr/TextSizeBody"/>
+
+ <EditText
+ android:id="@+id/shared_secret"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:hint="@string/shared_secret_secret"
+ android:inputType="textPassword"
+ android:textColor="@color/primarytext"
+ android:textColorHint="@color/secondarytext"
+ android:textSize="?attr/TextSizeBody"/>
+ </LinearLayout>
+ </LinearLayout>
+ </ScrollView>
+
+ <LinearLayout
+ android:id="@+id/button_bar"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentRight="true">
+
+ <Button
+ android:id="@+id/left_button"
+ style="?android:attr/borderlessButtonStyle"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"/>
+
+ <View
+ android:layout_width="1dp"
+ android:layout_height="fill_parent"
+ android:layout_marginBottom="7dp"
+ android:layout_marginTop="7dp"
+ android:background="@color/divider"/>
+
+ <Button
+ android:id="@+id/right_button"
+ style="?android:attr/borderlessButtonStyle"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"/>
+ </LinearLayout>
+
+</RelativeLayout> \ No newline at end of file
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 34c574ee..be548ad4 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -392,4 +392,11 @@
<string name="updating">Updating…</string>
<string name="password_changed">Password changed!</string>
<string name="could_not_change_password">Could not change password</string>
+ <string name="otr_session_not_started">Send a message to start an encrypted chat</string>
+ <string name="ask_question">Ask question</string>
+ <string name="smp_explain_question">If you and your contact have a secret in common that no one else knows (like an inside joke or simply what you had for lunch the last time you met) you can use that secret to verify each other\'s fingerprints.\n\nYou provide a hint or a question for your contact who will respond with a case-sensitive answer.</string>
+ <string name="smp_explain_answer">Your contact would like to verify your fingerprint by challenging you with a shared secret. Your contact provided the following hint or question for that secret.</string>
+ <string name="shared_secret_hint_should_not_be_empty">Your hint should not be empty</string>
+ <string name="shared_secret_can_not_be_empty">Your shared secret can not be empty</string>
+ <string name="manual_verification_explanation">Carefully compare the fingerprints shown below with the fingerprints of your contact.\nYou can use a trusted communication channel like an encrypted e-mail or a telephone call channel to exchange those.</string>
</resources>