summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-04-21 18:10:19 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2021-04-21 18:10:19 +0530
commita5b6dfc106f448b59628724a08fb4d6897cbe1d0 (patch)
tree4e4f0f8af2fc3ce7011624bc3a338ae8bac926fc /app/src/main/res
parent6ff01f5e1ee90c6203bc9bd0189eea33c42d6db0 (diff)
Support creating pinned shortcuts directly (#1393)
* CHANGELOG: update for pinning support * PasswordFragment: support pinning * PasswordStore: use `PasswordItem#createAuthEnabledIntent` * PasswordItem: add `createAuthEnabledIntent` API * DecryptActivity: remove last changed time Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/ic_push_pin_24dp.xml11
-rw-r--r--app/src/main/res/layout/decrypt_layout.xml15
-rw-r--r--app/src/main/res/menu/context_pass.xml6
-rw-r--r--app/src/main/res/values/strings.xml1
4 files changed, 19 insertions, 14 deletions
diff --git a/app/src/main/res/drawable/ic_push_pin_24dp.xml b/app/src/main/res/drawable/ic_push_pin_24dp.xml
new file mode 100644
index 00000000..f1e14a86
--- /dev/null
+++ b/app/src/main/res/drawable/ic_push_pin_24dp.xml
@@ -0,0 +1,11 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16,9V4l1,0c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1H7C6.45,2 6,2.45 6,3v0c0,0.55 0.45,1 1,1l1,0v5c0,1.66 -1.34,3 -3,3h0v2h5.97v7l1,1l1,-1v-7H19v-2h0C17.34,12 16,10.66 16,9z"
+ android:fillType="evenOdd"/>
+</vector>
diff --git a/app/src/main/res/layout/decrypt_layout.xml b/app/src/main/res/layout/decrypt_layout.xml
index 63ec9536..f705558a 100644
--- a/app/src/main/res/layout/decrypt_layout.xml
+++ b/app/src/main/res/layout/decrypt_layout.xml
@@ -38,19 +38,6 @@
app:layout_constraintTop_toBottomOf="@id/password_category"
tools:text="PASSWORD FILE NAME HERE" />
- <androidx.appcompat.widget.AppCompatTextView
- android:id="@+id/password_last_changed"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_marginStart="16dp"
- android:textColor="?android:attr/textColor"
- android:textIsSelectable="false"
- android:textSize="18sp"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/password_file"
- tools:text="LAST CHANGED HERE" />
-
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/divider"
@@ -59,7 +46,7 @@
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:src="@drawable/divider"
- app:layout_constraintTop_toBottomOf="@id/password_last_changed"
+ app:layout_constraintTop_toBottomOf="@id/password_file"
tools:ignore="ContentDescription" />
<androidx.recyclerview.widget.RecyclerView
diff --git a/app/src/main/res/menu/context_pass.xml b/app/src/main/res/menu/context_pass.xml
index 1ed6850b..2c6db5ff 100644
--- a/app/src/main/res/menu/context_pass.xml
+++ b/app/src/main/res/menu/context_pass.xml
@@ -25,4 +25,10 @@
android:icon="@drawable/ic_edit_24dp"
android:title="@string/edit"
app:showAsAction="ifRoom" />
+
+ <item
+ android:id="@+id/menu_pin_password"
+ android:icon="@drawable/ic_push_pin_24dp"
+ android:title="@string/place_shortcut_on_home_screen"
+ app:showAsAction="ifRoom" />
</menu>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e077bf11..bb736dc8 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -405,5 +405,6 @@
<string name="otp_import_manual_hint_secret">Secret</string>
<string name="otp_import_manual_hint_account">Account</string>
<string name="gpg_key_select_mandatory">Selecting a GPG key is necessary to proceed</string>
+ <string name="place_shortcut_on_home_screen">Place shortcut on home screen</string>
</resources>