summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2019-11-03 23:42:11 +0530
committerGitHub <noreply@github.com>2019-11-03 23:42:11 +0530
commit6b228a80ef31c34d930b7ad9cd33f684ef55df4a (patch)
treee0a75e9be60d7f4bce3945f021e1d6cde0faca0e /app/src/main/java
parent13a4bf12c3308c57a812406aee527e4a7ce86a25 (diff)
Improve password row UI (#561)
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/ui/adapters/EntryRecyclerAdapter.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/ui/adapters/EntryRecyclerAdapter.kt b/app/src/main/java/com/zeapo/pwdstore/ui/adapters/EntryRecyclerAdapter.kt
index cfaa0252..9bcb96e4 100644
--- a/app/src/main/java/com/zeapo/pwdstore/ui/adapters/EntryRecyclerAdapter.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/ui/adapters/EntryRecyclerAdapter.kt
@@ -4,7 +4,6 @@
*/
package com.zeapo.pwdstore.ui.adapters
-import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -77,19 +76,19 @@ abstract class EntryRecyclerAdapter internal constructor(val values: ArrayList<P
}
// Replace the contents of a view (invoked by the layout manager)
- @SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val pass = values[position]
holder.name.text = pass.toString()
if (pass.type == PasswordItem.TYPE_CATEGORY) {
+ holder.type.visibility = View.GONE
holder.typeImage.setImageResource(R.drawable.ic_folder_tinted_24dp)
} else {
holder.typeImage.setImageResource(R.drawable.ic_action_secure)
holder.name.text = pass.toString()
+ holder.type.visibility = View.VISIBLE
+ holder.type.text = pass.fullPathToParent.replace("(^/)|(/$)".toRegex(), "")
}
- holder.type.text = pass.fullPathToParent.replace("(^/)|(/$)".toRegex(), "")
-
holder.view.setOnClickListener(getOnClickListener(holder, pass))
holder.view.setOnLongClickListener(getOnLongClickListener(holder, pass))