diff options
author | Harsh Shandilya <msfjarvis@gmail.com> | 2019-11-04 12:08:13 +0530 |
---|---|---|
committer | Harsh Shandilya <msfjarvis@gmail.com> | 2019-11-04 20:13:18 +0530 |
commit | be47f13d75e4e5bae8dc4c260272dff002b35e80 (patch) | |
tree | 585b3aa4426348a7ecc2ec16f78c24c1bc6c0eae /app/src | |
parent | ed0296131505fa8f5404324a938c430f00d174b1 (diff) |
Add UI indicator for folders
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'app/src')
3 files changed, 23 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) } } diff --git a/app/src/main/res/drawable/ic_keyboard_arrow_right_24dp.xml b/app/src/main/res/drawable/ic_keyboard_arrow_right_24dp.xml new file mode 100644 index 00000000..882ab73a --- /dev/null +++ b/app/src/main/res/drawable/ic_keyboard_arrow_right_24dp.xml @@ -0,0 +1,10 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + android:tint="?attr/passwordIconColor"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M8.59,16.59L13.17,12 8.59,7.41 10,6l6,6 -6,6 -1.41,-1.41z"/> +</vector> diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml index 462df815..689898c2 100644 --- a/app/src/main/res/layout/password_row_layout.xml +++ b/app/src/main/res/layout/password_row_layout.xml @@ -47,6 +47,16 @@ app:layout_constraintTop_toBottomOf="@id/type" tools:text="FILE_NAME" /> + <androidx.appcompat.widget.AppCompatImageView + android:id="@+id/folder_indicator" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="16dp" + android:src="@drawable/ic_keyboard_arrow_right_24dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" /> + </androidx.constraintlayout.widget.ConstraintLayout> </com.zeapo.pwdstore.widget.MultiselectableLinearLayout>
\ No newline at end of file |