summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2019-11-04 12:08:13 +0530
committerHarsh Shandilya <msfjarvis@gmail.com>2019-11-04 20:13:18 +0530
commitbe47f13d75e4e5bae8dc4c260272dff002b35e80 (patch)
tree585b3aa4426348a7ecc2ec16f78c24c1bc6c0eae /app/src/main/java
parented0296131505fa8f5404324a938c430f00d174b1 (diff)
Add UI indicator for folders
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.kt5
1 files changed, 3 insertions, 2 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 9bcb96e4..211394fb 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
@@ -10,11 +10,9 @@ import android.view.ViewGroup
import androidx.appcompat.widget.AppCompatImageView
import androidx.appcompat.widget.AppCompatTextView
import androidx.recyclerview.widget.RecyclerView
-
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.utils.PasswordItem
import com.zeapo.pwdstore.widget.MultiselectableLinearLayout
-
import java.util.ArrayList
import java.util.TreeSet
@@ -82,11 +80,13 @@ abstract class EntryRecyclerAdapter internal constructor(val values: ArrayList<P
if (pass.type == PasswordItem.TYPE_CATEGORY) {
holder.type.visibility = View.GONE
holder.typeImage.setImageResource(R.drawable.ic_folder_tinted_24dp)
+ holder.folderIndicator.visibility = View.VISIBLE
} 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.folderIndicator.visibility = View.GONE
}
holder.view.setOnClickListener(getOnClickListener(holder, pass))
@@ -122,5 +122,6 @@ abstract class EntryRecyclerAdapter internal constructor(val values: ArrayList<P
val name: AppCompatTextView = view.findViewById(R.id.label)
val type: AppCompatTextView = view.findViewById(R.id.type)
val typeImage: AppCompatImageView = view.findViewById(R.id.type_image)
+ val folderIndicator: AppCompatImageView = view.findViewById(R.id.folder_indicator)
}
}