multidecrypt: context menu per card, not per file
This commit is contained in:
parent
ce105d955f
commit
97c55ee4bb
|
@ -325,6 +325,7 @@ public class DecryptListFragment
|
|||
Drawable icon = null;
|
||||
|
||||
if (ClipDescription.compareMimeTypes(type, "text/plain")) {
|
||||
// noinspection deprecation, this should be called from Context, but not available in minSdk
|
||||
icon = getResources().getDrawable(R.drawable.ic_chat_black_24dp);
|
||||
} else if (ClipDescription.compareMimeTypes(type, "image/*")) {
|
||||
int px = FormattingUtils.dpToPx(context, 48);
|
||||
|
@ -478,6 +479,10 @@ public class DecryptListFragment
|
|||
intent.putExtra(LogDisplayFragment.EXTRA_RESULT, model.mResult);
|
||||
activity.startActivity(intent);
|
||||
return true;
|
||||
case R.id.decrypt_delete:
|
||||
deleteFile(activity, model.mInputUri);
|
||||
return true;
|
||||
/*
|
||||
case R.id.decrypt_share:
|
||||
displayWithViewIntent(model.mResult, 0, true);
|
||||
return true;
|
||||
|
@ -490,9 +495,7 @@ public class DecryptListFragment
|
|||
FileHelper.saveDocument(this, metadata.getFilename(), model.mInputUri, metadata.getMimeType(),
|
||||
R.string.title_decrypt_to_file, R.string.specify_file_to_decrypt_to, REQUEST_CODE_OUTPUT);
|
||||
return true;
|
||||
case R.id.decrypt_delete:
|
||||
deleteFile(activity, model.mInputUri);
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -78,14 +78,24 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/result_encryption_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text=""
|
||||
tools:text="Encryption status text" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/context_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dip"
|
||||
android:clickable="true"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:src="@drawable/ic_menu_moreoverflow_normal_holo_light" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
android:id="@+id/file"
|
||||
android:clickable="true"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:minHeight="?listPreferredItemHeight"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
|
@ -51,13 +52,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/context_menu"
|
||||
android:scaleType="center"
|
||||
android:layout_width="36dip"
|
||||
android:layout_height="48dip"
|
||||
android:clickable="true"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:src="@drawable/ic_menu_moreoverflow_normal_holo_light" />
|
||||
|
||||
</LinearLayout>
|
|
@ -7,18 +7,6 @@
|
|||
android:icon="@drawable/ic_view_list_grey_24dp"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/decrypt_share"
|
||||
android:title="@string/btn_share_decrypted_text"
|
||||
android:icon="@drawable/ic_share_grey_24dp"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/decrypt_save"
|
||||
android:title="@string/btn_save_file"
|
||||
android:icon="@drawable/ic_action_encrypt_file_24dp"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/decrypt_delete"
|
||||
android:title="@string/btn_delete_original"
|
||||
|
|
Loading…
Reference in a new issue