aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorFelix Bechstein <f@ub0r.de>2017-07-22 12:09:34 +0200
committerMohamed Zenadi <zeapo@users.noreply.github.com>2017-07-22 12:09:34 +0200
commit5cba6c62d7b4628dfaf482dd883e333f93d323d4 (patch)
treeb28df0db4ca187df0cabc575bbd89c009f69e127 /app/src/main/res/layout
parent6ce31056c987b8fd73513d5b4eebc8d0d763a7a2 (diff)
Parse username from password entry, refs #192 (#318)
This is a first step of letting APS handle usernames from password entries. It shows the username in PgpHandler and allows to copy it to the clipboard.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/activity_pgp_handler.xml2
-rw-r--r--app/src/main/res/layout/decrypt_layout.xml61
-rw-r--r--app/src/main/res/layout/encrypt_layout.xml2
-rw-r--r--app/src/main/res/layout/key_id.xml2
4 files changed, 56 insertions, 11 deletions
diff --git a/app/src/main/res/layout/activity_pgp_handler.xml b/app/src/main/res/layout/activity_pgp_handler.xml
index 3c79b37d..71dcff3e 100644
--- a/app/src/main/res/layout/activity_pgp_handler.xml
+++ b/app/src/main/res/layout/activity_pgp_handler.xml
@@ -8,7 +8,7 @@
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.zeapo.pwdstore.crypto.PgpHandler"
android:orientation="vertical"
- android:background="#eee">
+ android:background="@color/background">
<GridLayout
android:layout_width="match_parent"
diff --git a/app/src/main/res/layout/decrypt_layout.xml b/app/src/main/res/layout/decrypt_layout.xml
index e04e8ea2..2a94dfee 100644
--- a/app/src/main/res/layout/decrypt_layout.xml
+++ b/app/src/main/res/layout/decrypt_layout.xml
@@ -5,7 +5,7 @@
android:layout_height="match_parent"
tools:context="com.zeapo.pwdstore.crypto.PgpHandler"
android:orientation="vertical"
- android:background="#eee">
+ android:background="@color/background">
<LinearLayout
android:layout_width="fill_parent"
@@ -99,28 +99,73 @@
android:layout_columnSpan="3"/>
</GridLayout>
- <LinearLayout
+
+ <RelativeLayout
android:id="@+id/crypto_extra_show_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
android:visibility="invisible">
+ <ImageButton
+ android:id="@+id/crypto_copy_username"
+ 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_username_show_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textStyle="bold"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true"
+ android:layout_toLeftOf="@id/crypto_copy_username"
+ android:layout_toEndOf="@id/crypto_copy_username"
+ android:text="@string/username"
android:textColor="@android:color/black"
- android:text="@string/extra_content"/>
+ android:textStyle="bold" />
+
<TextView
- android:id="@+id/crypto_extra_show"
+ android:id="@+id/crypto_username_show"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_below="@id/crypto_username_show_label"
+ android:layout_toLeftOf="@id/crypto_copy_username"
+ android:layout_toEndOf="@id/crypto_copy_username"
+ 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:text="@string/extra_content"
+ android:textColor="@android:color/black"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/crypto_extra_show"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_below="@id/crypto_extra_show_label"
android:textColor="@android:color/black"
- android:typeface="monospace"/>
+ android:textIsSelectable="true"
+ android:typeface="monospace" />
- </LinearLayout>
+ </RelativeLayout>
</LinearLayout>
</LinearLayout>
diff --git a/app/src/main/res/layout/encrypt_layout.xml b/app/src/main/res/layout/encrypt_layout.xml
index 98a6b04d..30ccfba4 100644
--- a/app/src/main/res/layout/encrypt_layout.xml
+++ b/app/src/main/res/layout/encrypt_layout.xml
@@ -5,7 +5,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.zeapo.pwdstore.crypto.PgpHandler"
- android:background="#eee"
+ android:background="@color/background"
android:padding="@dimen/activity_horizontal_margin">
<LinearLayout
diff --git a/app/src/main/res/layout/key_id.xml b/app/src/main/res/layout/key_id.xml
index ffeb7a0d..2c95ce8d 100644
--- a/app/src/main/res/layout/key_id.xml
+++ b/app/src/main/res/layout/key_id.xml
@@ -7,7 +7,7 @@
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
- android:background="#eee">
+ android:background="@color/background">
<GridLayout
android:layout_width="match_parent"