aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorWiktor Kwapisiewicz <wiktor@metacode.biz>2017-11-06 12:41:00 +0100
committerMohamed Zenadi <zeapo@users.noreply.github.com>2017-11-19 11:14:45 +0100
commit3d5dd65e306ba3ca560b3c221830ee4cdb4363fb (patch)
tree6a417353098a9dc22093568c7e6c1dd505997512 /app/src/main/res/layout
parent67a7b124eec9178f8539664bf4d2528a111465b2 (diff)
Display TOTP code if entry contains OTP secret
TOTP is calculated on display and on copy to clipboard from secret embedded in entry (either in password or in extra) and the current time.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/decrypt_layout.xml39
1 files changed, 38 insertions, 1 deletions
diff --git a/app/src/main/res/layout/decrypt_layout.xml b/app/src/main/res/layout/decrypt_layout.xml
index 971331a9..727b6376 100644
--- a/app/src/main/res/layout/decrypt_layout.xml
+++ b/app/src/main/res/layout/decrypt_layout.xml
@@ -148,13 +148,50 @@
android:textIsSelectable="true"
android:typeface="monospace" />
+ <ImageButton
+ android:id="@+id/crypto_copy_totp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentTop="true"
+ android:contentDescription="@string/copy_username"
+ android:background="@color/background"
+ android:src="@drawable/ic_content_copy"/>
+
+ <TextView
+ android:id="@+id/crypto_totp_show_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true"
+ android:layout_toLeftOf="@id/crypto_copy_totp"
+ android:layout_toStartOf="@id/crypto_copy_totp"
+ android:text="@string/totp"
+ android:textColor="@android:color/black"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/crypto_totp_show"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_below="@id/crypto_totp_show_label"
+ android:layout_toLeftOf="@id/crypto_copy_totp"
+ android:layout_toStartOf="@id/crypto_copy_totp"
+ android:textColor="@android:color/black"
+ android:textIsSelectable="true"
+ android:typeface="monospace" />
+
<TextView
android:id="@+id/crypto_extra_show_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
- android:layout_below="@id/crypto_username_show"
+ android:layout_below="@id/crypto_totp_show"
android:text="@string/extra_content"
android:textColor="@android:color/black"
android:textStyle="bold" />