From eea0e68dda1eb7248c6d458f52baeedb318b466a Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Tue, 25 Sep 2018 13:45:54 -0400 Subject: Display HOTP code if password contains HOTP secret, unify HOTP and TOTP code (#413) * Display HOTP code if password contains HOTP secret, unify HOTP and TOTP code * Add ability to show HOTP instead of showing every decrypt * Fix off by 1 error * fix return intent logic so that edits and HOTP increments are properly committed * fix linting errors * Fix broken logic for case when a password is created * add ability to choose if password entry will be updated on HOTP code calculation --- app/src/main/res/layout/decrypt_layout.xml | 91 +++++++++++++------------- app/src/main/res/layout/otp_confirm_layout.xml | 21 ++++++ app/src/main/res/values-ar/strings.xml | 4 +- app/src/main/res/values/strings.xml | 16 +++-- app/src/main/res/xml/preference.xml | 3 + 5 files changed, 84 insertions(+), 51 deletions(-) create mode 100644 app/src/main/res/layout/otp_confirm_layout.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/decrypt_layout.xml b/app/src/main/res/layout/decrypt_layout.xml index ac274e4e..d08e0dbf 100644 --- a/app/src/main/res/layout/decrypt_layout.xml +++ b/app/src/main/res/layout/decrypt_layout.xml @@ -3,15 +3,15 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context="com.zeapo.pwdstore.crypto.PgpActivity" + android:background="@color/background" android:orientation="vertical" - android:background="@color/background"> + tools:context="com.zeapo.pwdstore.crypto.PgpActivity"> + android:orientation="vertical" + android:padding="16dp"> + android:text="@string/password" + android:textColor="@android:color/black" + android:textStyle="bold" /> + + android:layout_row="0" + android:textColor="@android:color/black" + android:typeface="monospace" /> + android:layout_columnSpan="3" + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp" + android:layout_row="1" />