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..176f4a82 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,10 @@ 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 com.zeapo.pwdstore.widget.MultiselectableConstraintLayout +import java.io.File import java.util.ArrayList import java.util.TreeSet @@ -81,12 +80,20 @@ abstract class EntryRecyclerAdapter internal constructor(val values: ArrayList

File(current, name).isFile } ?: emptyArray()).size + if (childCount > 0) { + holder.childCount.visibility = View.VISIBLE + holder.childCount.text = "$childCount" + } } 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.childCount.visibility = View.GONE + holder.folderIndicator.visibility = View.GONE } holder.view.setOnClickListener(getOnClickListener(holder, pass)) @@ -96,7 +103,7 @@ abstract class EntryRecyclerAdapter internal constructor(val values: ArrayList

+ android:pathData="M8.59,16.59L13.17,12 8.59,7.41 10,6l6,6 -6,6 -1.41,-1.41z"/> diff --git a/app/src/main/res/drawable/ic_multiple_files_tinted_24dp.xml b/app/src/main/res/drawable/ic_multiple_files_tinted_24dp.xml new file mode 100644 index 00000000..b8c2edab --- /dev/null +++ b/app/src/main/res/drawable/ic_multiple_files_tinted_24dp.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/fragment_to_clone_or_not.xml b/app/src/main/res/layout/fragment_to_clone_or_not.xml index cef35e1f..045d8d1e 100644 --- a/app/src/main/res/layout/fragment_to_clone_or_not.xml +++ b/app/src/main/res/layout/fragment_to_clone_or_not.xml @@ -1,81 +1,80 @@ - + android:orientation="vertical"> - + - + - + -