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>
This commit is contained in:
parent
ffb47031b0
commit
465d5b867a
4 changed files with 9 additions and 36 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue