diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/ui/adapters/PasswordItemRecyclerAdapter.kt | 3 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_multiple_files_24dp.xml | 15 | ||||
-rw-r--r-- | app/src/main/res/layout/password_row_layout.xml | 26 |
4 files changed, 9 insertions, 36 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 23b188a3..30b6638f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. - Light theme is now a consistent white across the board with ample contrast - XkPassword generator is now easier to use with less configuration options - Edit screen now has better protection and guidance for invalid names +- Improve password list UI ### Fixed 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" |