mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
Combine lock indicator with overflow icon
Requested by design Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
a902fb6f84
commit
46ccddcef4
5 changed files with 15 additions and 19 deletions
|
@ -32,5 +32,4 @@ internal interface ListItemViewHolder : ListGridItemViewHolder {
|
|||
val lastModification: TextView
|
||||
val overflowMenu: ImageView
|
||||
val sharedAvatars: AvatarGroupLayout
|
||||
val lockIndicator: View
|
||||
}
|
||||
|
|
|
@ -468,10 +468,9 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
}
|
||||
|
||||
if (file.isLocked()) {
|
||||
holder.getLockIndicator().setVisibility(View.VISIBLE);
|
||||
holder.getLockIndicator().setOnClickListener(view -> ocFileListFragmentInterface.onLockIndicatorClicked(file));
|
||||
holder.getOverflowMenu().setImageResource(R.drawable.ic_locked_dots_small);
|
||||
} else {
|
||||
holder.getLockIndicator().setVisibility(View.GONE);
|
||||
holder.getOverflowMenu().setImageResource(R.drawable.ic_dots_vertical);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,8 +62,6 @@ internal class OCFileListItemViewHolder(private var binding: ListItemBinding) :
|
|||
get() = binding.ListItemLayout
|
||||
override val unreadComments: ImageView
|
||||
get() = binding.unreadComments
|
||||
override val lockIndicator: View
|
||||
get() = binding.lockIndicator
|
||||
|
||||
init {
|
||||
binding.favoriteAction.drawable.mutate()
|
||||
|
|
13
app/src/main/res/drawable/ic_locked_dots_small.xml
Normal file
13
app/src/main/res/drawable/ic_locked_dots_small.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="m7.9482,15.6104c0.3479,0 0.682,-0.1385 0.9282,-0.3847 0.2462,-0.2462 0.3847,-0.5803 0.3847,-0.9282 0,-0.7286 -0.5908,-1.3129 -1.3129,-1.3129 -0.3479,0 -0.682,0.1385 -0.9282,0.3847 -0.2462,0.2462 -0.3847,0.5803 -0.3847,0.9282 0,0.3479 0.1385,0.682 0.3847,0.9282 0.2462,0.2462 0.5803,0.3847 0.9282,0.3847M11.8868,9.7025c0.3479,0 0.682,0.1385 0.9282,0.3847 0.2462,0.2462 0.3847,0.5803 0.3847,0.9282v6.5644c0,0.3479 -0.1385,0.682 -0.3847,0.9282 -0.2462,0.2462 -0.5803,0.3847 -0.9282,0.3847H4.0095c-0.3479,0 -0.682,-0.1385 -0.9282,-0.3847 -0.2462,-0.2462 -0.3847,-0.5803 -0.3847,-0.9282v-6.5644c0,-0.7286 0.5908,-1.3129 1.3129,-1.3129H4.666V8.3896c0,-0.8704 0.3459,-1.7054 0.961,-2.3212 0.6157,-0.6151 1.4507,-0.961 2.3212,-0.961 0.8704,0 1.7054,0.3459 2.3212,0.961 0.6151,0.6157 0.961,1.4507 0.961,2.3212v1.3129h0.6564M7.9482,6.4203c-0.5219,0 -1.0234,0.2074 -1.3923,0.577C6.1863,7.3662 5.9789,7.8677 5.9789,8.3896V9.7025H9.9175V8.3896c0,-0.5219 -0.2074,-1.0234 -0.577,-1.3923C8.9716,6.6277 8.47,6.4203 7.9482,6.4203Z"
|
||||
android:strokeWidth="0.656438"
|
||||
android:fillColor="#666666"/>
|
||||
<path
|
||||
android:pathData="m19.3033,8c1.1,0 2,-0.9 2,-2 0,-1.1 -0.9,-2 -2,-2 -1.1,0 -2,0.9 -2,2 0,1.1 0.9,2 2,2zM19.3033,10c-1.1,0 -2,0.9 -2,2 0,1.1 0.9,2 2,2 1.1,0 2,-0.9 2,-2 0,-1.1 -0.9,-2 -2,-2zM19.3033,16c-1.1,0 -2,0.9 -2,2 0,1.1 0.9,2 2,2 1.1,0 2,-0.9 2,-2 0,-1.1 -0.9,-2 -2,-2z"
|
||||
android:fillColor="#666666"/>
|
||||
</vector>
|
|
@ -177,19 +177,6 @@
|
|||
android:contentDescription="@string/shared_avatar_desc"
|
||||
android:visibility="visible" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/lock_indicator"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:contentDescription="@string/shared_icon_share"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:paddingStart="@dimen/list_item_share_right_margin"
|
||||
android:paddingEnd="@dimen/list_item_share_right_margin"
|
||||
android:src="@drawable/ic_lock_white"
|
||||
android:visibility="gone"
|
||||
app:tint="#666666"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/custom_checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
Loading…
Reference in a new issue