Put decrypt result in toolbar, some ui fixes for decrypt

This commit is contained in:
Dominik Schürmann
2015-04-26 00:33:26 +02:00
parent f1f0126048
commit c442d3bd0d
17 changed files with 164 additions and 16 deletions

View File

@@ -79,17 +79,18 @@ public abstract class DecryptFragment extends CryptoOperationFragment implements
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mResultLayout = (LinearLayout) view.findViewById(R.id.result_main_layout);
// NOTE: These views are inside the activity!
mResultLayout = (LinearLayout) getActivity().findViewById(R.id.result_main_layout);
mResultLayout.setVisibility(View.GONE);
mEncryptionIcon = (ImageView) view.findViewById(R.id.result_encryption_icon);
mEncryptionText = (TextView) view.findViewById(R.id.result_encryption_text);
mSignatureIcon = (ImageView) view.findViewById(R.id.result_signature_icon);
mSignatureText = (TextView) view.findViewById(R.id.result_signature_text);
mSignatureLayout = view.findViewById(R.id.result_signature_layout);
mSignatureName = (TextView) view.findViewById(R.id.result_signature_name);
mSignatureEmail = (TextView) view.findViewById(R.id.result_signature_email);
mSignatureAction = (TextView) view.findViewById(R.id.result_signature_action);
mEncryptionIcon = (ImageView) getActivity().findViewById(R.id.result_encryption_icon);
mEncryptionText = (TextView) getActivity().findViewById(R.id.result_encryption_text);
mSignatureIcon = (ImageView) getActivity().findViewById(R.id.result_signature_icon);
mSignatureText = (TextView) getActivity().findViewById(R.id.result_signature_text);
mSignatureLayout = getActivity().findViewById(R.id.result_signature_layout);
mSignatureName = (TextView) getActivity().findViewById(R.id.result_signature_name);
mSignatureEmail = (TextView) getActivity().findViewById(R.id.result_signature_email);
mSignatureAction = (TextView) getActivity().findViewById(R.id.result_signature_action);
}

View File

@@ -97,9 +97,9 @@ public class DecryptTextFragment extends DecryptFragment {
/**
* Create Intent Chooser but exclude decrypt activites
*/
private Intent sendWithChooserExcludingEncrypt(String text) {
private Intent sendWithChooserExcludingDecrypt(String text) {
Intent prototype = createSendIntent(text);
String title = getString(R.string.title_share_file);
String title = getString(R.string.title_share_message);
// we don't want to decrypt the decrypted, no inception ;)
String[] blacklist = new String[]{
@@ -147,7 +147,7 @@ public class DecryptTextFragment extends DecryptFragment {
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.decrypt_share: {
startActivity(sendWithChooserExcludingEncrypt(mText.getText().toString()));
startActivity(sendWithChooserExcludingDecrypt(mText.getText().toString()));
break;
}
case R.id.decrypt_copy: {