Use overflow menu instead of long click in decrypt file list
Fixes #2370
This commit is contained in:
parent
03ddbbe9a2
commit
16802dc259
|
@ -1005,12 +1005,11 @@ public class DecryptListFragment
|
|||
// save index closure-style :)
|
||||
final int idx = i;
|
||||
|
||||
fileHolder.vFile.setOnLongClickListener(view -> {
|
||||
fileHolder.vOverflowMenu.setVisibility(model.mResult.success() ? View.VISIBLE : View.GONE);
|
||||
fileHolder.vOverflowMenu.setOnClickListener(view -> {
|
||||
if (model.mResult.success()) {
|
||||
displayBottomSheet(model.mResult, idx);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
fileHolder.vFile.setOnClickListener(view -> {
|
||||
|
@ -1172,12 +1171,14 @@ public class DecryptListFragment
|
|||
public TextView vFilename;
|
||||
public TextView vFilesize;
|
||||
public ImageView vThumbnail;
|
||||
public ImageView vOverflowMenu;
|
||||
|
||||
public SubViewHolder(View itemView) {
|
||||
vFile = itemView.findViewById(R.id.file);
|
||||
vFilename = itemView.findViewById(R.id.filename);
|
||||
vFilesize = itemView.findViewById(R.id.filesize);
|
||||
vThumbnail = itemView.findViewById(R.id.thumbnail);
|
||||
vOverflowMenu = itemView.findViewById(R.id.button_decryptfile_overflow);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,4 +52,14 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/button_decryptfile_overflow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_more_vert_black_24dp"
|
||||
android:padding="6dp"
|
||||
android:background="?selectableItemBackground"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in a new issue