aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-07-19 13:55:34 +0530
committerGitHub <noreply@github.com>2020-07-19 10:25:34 +0200
commit465d5b867a67b3c9b24ecd024aeb6dbf925615cd (patch)
tree434b9d3973ea0e1591291d070be56074037261f2 /app/src/main
parentffb47031b070e2676e7085ac316841d85d1b3773 (diff)
Remove type images (#939)
* Remove type images Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Update changelog Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordItemRecyclerAdapter.kt3
-rw-r--r--app/src/main/res/drawable/ic_multiple_files_24dp.xml15
-rw-r--r--app/src/main/res/layout/password_row_layout.xml26
3 files changed, 8 insertions, 36 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordItemRecyclerAdapter.kt b/app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordItemRecyclerAdapter.kt
index 5a332fa5..15e13745 100644
--- a/app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordItemRecyclerAdapter.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordItemRecyclerAdapter.kt
@@ -43,7 +43,6 @@ open class PasswordItemRecyclerAdapter :
class PasswordItemViewHolder(view: View) : RecyclerView.ViewHolder(view) {
private val name: AppCompatTextView = itemView.findViewById(R.id.label)
- private val typeImage: AppCompatImageView = itemView.findViewById(R.id.type_image)
private val childCount: AppCompatTextView = itemView.findViewById(R.id.child_count)
private val folderIndicator: AppCompatImageView =
itemView.findViewById(R.id.folder_indicator)
@@ -55,7 +54,6 @@ open class PasswordItemRecyclerAdapter :
val showHidden = settings.getBoolean(PreferenceKeys.SHOW_HIDDEN_FOLDERS, false)
name.text = item.toString()
if (item.type == PasswordItem.TYPE_CATEGORY) {
- typeImage.setImageResource(R.drawable.ic_multiple_files_24dp)
folderIndicator.visibility = View.VISIBLE
val children = item.file.listFiles { pathname ->
!(!showHidden && (pathname.isDirectory && pathname.isHidden))
@@ -64,7 +62,6 @@ open class PasswordItemRecyclerAdapter :
childCount.visibility = if (count > 0) View.VISIBLE else View.GONE
childCount.text = "$count"
} else {
- typeImage.setImageResource(R.drawable.ic_action_secure_24dp)
val parentPath = item.fullPathToParent.replace("(^/)|(/$)".toRegex(), "")
val source = if (parentPath.isNotEmpty()) {
"$parentPath\n$item"
diff --git a/app/src/main/res/drawable/ic_multiple_files_24dp.xml b/app/src/main/res/drawable/ic_multiple_files_24dp.xml
deleted file mode 100644
index 163e278c..00000000
--- a/app/src/main/res/drawable/ic_multiple_files_24dp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<!--
- ~ Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
- ~ SPDX-License-Identifier: GPL-3.0-only
- -->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:tint="?colorOnPrimary"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM15,5L8,5c-1.1,0 -1.99,0.9 -1.99,2L6,21c0,1.1 0.89,2 1.99,2L19,23c1.1,0 2,-0.9 2,-2L21,11l-6,-6zM8,21L8,7h6v5h5v9L8,21z" />
-</vector>
diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml
index 81065fc2..06874e11 100644
--- a/app/src/main/res/layout/password_row_layout.xml
+++ b/app/src/main/res/layout/password_row_layout.xml
@@ -12,46 +12,36 @@
android:paddingTop="12dp"
android:paddingBottom="12dp">
- <ImageView
- android:id="@+id/type_image"
- android:layout_width="60dp"
- android:layout_height="32dp"
- android:layout_gravity="bottom"
- android:alpha="0.5"
- android:contentDescription="@string/folder_icon_hint"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- tools:src="@drawable/ic_multiple_files_24dp" />
-
- <TextView
+ <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/label"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
+ android:layout_marginStart="@dimen/activity_horizontal_margin"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/child_count"
- app:layout_constraintStart_toEndOf="@id/type_image"
+ app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="FILE_NAME" />
- <TextView
+ <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/child_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginEnd="12dp"
+ android:layout_marginEnd="8dp"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/folder_indicator"
app:layout_constraintTop_toTopOf="parent"
tools:text="12" />
- <ImageView
+ <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/folder_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginEnd="16dp"
+ android:layout_marginEnd="@dimen/activity_horizontal_margin"
+ android:contentDescription="@null"
android:src="@drawable/ic_keyboard_arrow_right_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"