Use overflow menu instead of long click in decrypt file list
Fixes #2370
This commit is contained in:
@@ -1005,12 +1005,11 @@ public class DecryptListFragment
|
|||||||
// save index closure-style :)
|
// save index closure-style :)
|
||||||
final int idx = i;
|
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()) {
|
if (model.mResult.success()) {
|
||||||
displayBottomSheet(model.mResult, idx);
|
displayBottomSheet(model.mResult, idx);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
fileHolder.vFile.setOnClickListener(view -> {
|
fileHolder.vFile.setOnClickListener(view -> {
|
||||||
@@ -1172,12 +1171,14 @@ public class DecryptListFragment
|
|||||||
public TextView vFilename;
|
public TextView vFilename;
|
||||||
public TextView vFilesize;
|
public TextView vFilesize;
|
||||||
public ImageView vThumbnail;
|
public ImageView vThumbnail;
|
||||||
|
public ImageView vOverflowMenu;
|
||||||
|
|
||||||
public SubViewHolder(View itemView) {
|
public SubViewHolder(View itemView) {
|
||||||
vFile = itemView.findViewById(R.id.file);
|
vFile = itemView.findViewById(R.id.file);
|
||||||
vFilename = itemView.findViewById(R.id.filename);
|
vFilename = itemView.findViewById(R.id.filename);
|
||||||
vFilesize = itemView.findViewById(R.id.filesize);
|
vFilesize = itemView.findViewById(R.id.filesize);
|
||||||
vThumbnail = itemView.findViewById(R.id.thumbnail);
|
vThumbnail = itemView.findViewById(R.id.thumbnail);
|
||||||
|
vOverflowMenu = itemView.findViewById(R.id.button_decryptfile_overflow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,4 +52,14 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</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>
|
</LinearLayout>
|
||||||
Reference in New Issue
Block a user