aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-11-02 20:25:37 +0100
committerGitHub <noreply@github.com>2020-11-02 20:25:37 +0100
commit1d13a1fbd6580c0d28c90579ade96e0a93e17c92 (patch)
tree89cf7824cb7938bb107cca37124dc91354b19087 /app/src/main/res/layout
parentcff8d41c91a73371f7eb65b08730fa548ce510a4 (diff)
downloadHardenedPass-1d13a1fbd6580c0d28c90579ade96e0a93e17c92.tar.gz
HardenedPass-1d13a1fbd6580c0d28c90579ade96e0a93e17c92.zip
Improve Autofill UI and enable inline presentations (#1181)
* Improve Autofill UI and enable inline presentations Improves the Autofill UI in the following ways: * Add support for Android 11 inline presentations of Autofill datasets. * Instead of showing the identifier (app name or web origin) of the current app on top of every Autofill dataset, it is now shown 1) as a header dataset on Android 9 and 10 as well as 2) at the top of the search activity on all supported versions of Android. Rationale: The identifier is only used in trust decisions when choosing an existing entry to fill and should feature prominently in that view, not elsewhere. * Show the actual identifier part of a matched entry's path, which may differ from the identifier of the matched app/website. * Slightly tweak the labels of Search/Generate Autofill actions to indicate that a) this is about entries and b) the user may skip the generation of a password and supply a custom one as well. * Suppress lint error * Address review comments * Add a fixme about properly handling fill-in datasets * CHANGELOG: add entry for inline presentation Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Remove unused parameter Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/activity_oreo_autofill_filter.xml18
-rw-r--r--app/src/main/res/layout/oreo_autofill_dataset.xml7
2 files changed, 20 insertions, 5 deletions
diff --git a/app/src/main/res/layout/activity_oreo_autofill_filter.xml b/app/src/main/res/layout/activity_oreo_autofill_filter.xml
index a3718b43..8e671e30 100644
--- a/app/src/main/res/layout/activity_oreo_autofill_filter.xml
+++ b/app/src/main/res/layout/activity_oreo_autofill_filter.xml
@@ -14,16 +14,28 @@
<ImageView
android:id="@+id/cover"
android:layout_width="0dp"
- android:layout_height="80dp"
+ android:layout_height="60dp"
android:background="@color/primary_color"
android:contentDescription="@string/app_name"
android:src="@mipmap/ic_launcher_foreground"
- app:layout_constraintBottom_toTopOf="@id/searchLayout"
+ app:layout_constraintBottom_toTopOf="@id/origin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
+ <TextView
+ android:id="@+id/origin"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:singleLine="false"
+ android:textAlignment="center"
+ app:layout_constraintBottom_toTopOf="@id/searchLayout"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/cover"
+ app:layout_constraintVertical_bias="0.0" />
+
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/searchLayout"
android:layout_width="match_parent"
@@ -35,7 +47,7 @@
app:layout_constraintBottom_toTopOf="@id/rvPasswordSwitcher"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/cover">
+ app:layout_constraintTop_toBottomOf="@id/origin">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/search"
diff --git a/app/src/main/res/layout/oreo_autofill_dataset.xml b/app/src/main/res/layout/oreo_autofill_dataset.xml
index 2e9f48b9..e13d1688 100644
--- a/app/src/main/res/layout/oreo_autofill_dataset.xml
+++ b/app/src/main/res/layout/oreo_autofill_dataset.xml
@@ -6,9 +6,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
android:orientation="horizontal"
+ android:gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingTop="5dp"
android:paddingRight="10dp"
@@ -20,6 +21,8 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginEnd="10dp"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
android:adjustViewBounds="true"
android:maxWidth="20dp"
android:maxHeight="20dp"