Use buttons for encrypt decrypt instead of actionbar
This commit is contained in:
@@ -120,8 +120,7 @@
|
|||||||
android:name=".ui.SelectPublicKeyActivity"
|
android:name=".ui.SelectPublicKeyActivity"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||||
android:label="@string/title_select_recipients"
|
android:label="@string/title_select_recipients"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop">
|
||||||
android:uiOptions="splitActionBarWhenNarrow">
|
|
||||||
|
|
||||||
<!-- <intent-filter> -->
|
<!-- <intent-filter> -->
|
||||||
<!-- <action android:name="android.intent.action.SEARCH" /> -->
|
<!-- <action android:name="android.intent.action.SEARCH" /> -->
|
||||||
@@ -151,7 +150,6 @@
|
|||||||
android:name=".ui.EncryptActivity"
|
android:name=".ui.EncryptActivity"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||||
android:label="@string/title_encrypt"
|
android:label="@string/title_encrypt"
|
||||||
android:uiOptions="splitActionBarWhenNarrow"
|
|
||||||
android:windowSoftInputMode="stateHidden">
|
android:windowSoftInputMode="stateHidden">
|
||||||
|
|
||||||
<!-- Keychain's own Actions -->
|
<!-- Keychain's own Actions -->
|
||||||
@@ -175,7 +173,6 @@
|
|||||||
android:name=".ui.DecryptActivity"
|
android:name=".ui.DecryptActivity"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||||
android:label="@string/title_decrypt"
|
android:label="@string/title_decrypt"
|
||||||
android:uiOptions="splitActionBarWhenNarrow"
|
|
||||||
android:windowSoftInputMode="stateHidden">
|
android:windowSoftInputMode="stateHidden">
|
||||||
|
|
||||||
<!-- Keychain's own Actions -->
|
<!-- Keychain's own Actions -->
|
||||||
@@ -250,7 +247,6 @@
|
|||||||
android:name=".ui.PreferencesKeyServerActivity"
|
android:name=".ui.PreferencesKeyServerActivity"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||||
android:label="@string/title_key_server_preference"
|
android:label="@string/title_key_server_preference"
|
||||||
android:uiOptions="splitActionBarWhenNarrow"
|
|
||||||
android:windowSoftInputMode="stateHidden" />
|
android:windowSoftInputMode="stateHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.SignKeyActivity"
|
android:name=".ui.SignKeyActivity"
|
||||||
|
|||||||
@@ -55,10 +55,6 @@ import android.os.Bundle;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.Messenger;
|
import android.os.Messenger;
|
||||||
import android.support.v4.view.MenuCompat;
|
|
||||||
import android.support.v4.view.MenuItemCompat;
|
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
@@ -99,11 +95,6 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
private ImageView mSourcePrevious = null;
|
private ImageView mSourcePrevious = null;
|
||||||
private ImageView mSourceNext = null;
|
private ImageView mSourceNext = null;
|
||||||
|
|
||||||
private boolean mDecryptEnabled = true;
|
|
||||||
private String mDecryptString = "";
|
|
||||||
private boolean mReplyEnabled = true;
|
|
||||||
private String mReplyString = "";
|
|
||||||
|
|
||||||
private int mDecryptTarget;
|
private int mDecryptTarget;
|
||||||
|
|
||||||
private EditText mFilename = null;
|
private EditText mFilename = null;
|
||||||
@@ -126,40 +117,7 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
|
|
||||||
private boolean mDecryptImmediately = false;
|
private boolean mDecryptImmediately = false;
|
||||||
|
|
||||||
@Override
|
private BootstrapButton mDecryptButton;
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
|
||||||
if (mDecryptEnabled) {
|
|
||||||
MenuItem item = menu.add(1, Id.menu.option.decrypt, 0, mDecryptString);
|
|
||||||
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
|
||||||
}
|
|
||||||
if (mReplyEnabled) {
|
|
||||||
MenuItem item = menu.add(1, Id.menu.option.reply, 1, mReplyString);
|
|
||||||
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
switch (item.getItemId()) {
|
|
||||||
|
|
||||||
case Id.menu.option.decrypt: {
|
|
||||||
decryptClicked();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case Id.menu.option.reply: {
|
|
||||||
replyClicked();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
default: {
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
mSource = (ViewFlipper) findViewById(R.id.source);
|
mSource = (ViewFlipper) findViewById(R.id.source);
|
||||||
@@ -225,6 +183,14 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
while (mSource.getCurrentView().getId() != R.id.sourceMessage) {
|
while (mSource.getCurrentView().getId() != R.id.sourceMessage) {
|
||||||
mSource.showNext();
|
mSource.showNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mDecryptButton = (BootstrapButton) findViewById(R.id.action_decrypt);
|
||||||
|
mDecryptButton.setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
decryptClicked();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -280,11 +246,6 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mReplyEnabled = false;
|
|
||||||
|
|
||||||
// build new actionbar
|
|
||||||
supportInvalidateOptionsMenu();
|
|
||||||
|
|
||||||
if (mReturnResult) {
|
if (mReturnResult) {
|
||||||
mSourcePrevious.setClickable(false);
|
mSourcePrevious.setClickable(false);
|
||||||
mSourcePrevious.setEnabled(false);
|
mSourcePrevious.setEnabled(false);
|
||||||
@@ -371,10 +332,6 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
// replace non breakable spaces
|
// replace non breakable spaces
|
||||||
textData = textData.replaceAll("\\xa0", " ");
|
textData = textData.replaceAll("\\xa0", " ");
|
||||||
mMessage.setText(textData);
|
mMessage.setText(textData);
|
||||||
|
|
||||||
mDecryptString = getString(R.string.btn_verify);
|
|
||||||
// build new action bar
|
|
||||||
supportInvalidateOptionsMenu();
|
|
||||||
} else {
|
} else {
|
||||||
Log.d(Constants.TAG, "Nothing matched!");
|
Log.d(Constants.TAG, "Nothing matched!");
|
||||||
}
|
}
|
||||||
@@ -420,19 +377,13 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
switch (mSource.getCurrentView().getId()) {
|
switch (mSource.getCurrentView().getId()) {
|
||||||
case R.id.sourceFile: {
|
case R.id.sourceFile: {
|
||||||
mSourceLabel.setText(R.string.label_file);
|
mSourceLabel.setText(R.string.label_file);
|
||||||
mDecryptString = getString(R.string.btn_decrypt);
|
mDecryptButton.setText(getString(R.string.btn_decrypt));
|
||||||
|
|
||||||
// build new action bar
|
|
||||||
supportInvalidateOptionsMenu();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case R.id.sourceMessage: {
|
case R.id.sourceMessage: {
|
||||||
mSourceLabel.setText(R.string.label_message);
|
mSourceLabel.setText(R.string.label_message);
|
||||||
mDecryptString = getString(R.string.btn_decrypt);
|
mDecryptButton.setText(getString(R.string.btn_decrypt));
|
||||||
|
|
||||||
// build new action bar
|
|
||||||
supportInvalidateOptionsMenu();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -722,10 +673,6 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
|
|
||||||
mSignatureKeyId = 0;
|
mSignatureKeyId = 0;
|
||||||
mSignatureLayout.setVisibility(View.GONE);
|
mSignatureLayout.setVisibility(View.GONE);
|
||||||
mReplyEnabled = false;
|
|
||||||
|
|
||||||
// build new action bar
|
|
||||||
supportInvalidateOptionsMenu();
|
|
||||||
|
|
||||||
Toast.makeText(DecryptActivity.this, R.string.decryption_successful,
|
Toast.makeText(DecryptActivity.this, R.string.decryption_successful,
|
||||||
Toast.LENGTH_SHORT).show();
|
Toast.LENGTH_SHORT).show();
|
||||||
@@ -743,10 +690,7 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
.getString(KeychainIntentService.RESULT_DECRYPTED_STRING);
|
.getString(KeychainIntentService.RESULT_DECRYPTED_STRING);
|
||||||
mMessage.setText(decryptedMessage);
|
mMessage.setText(decryptedMessage);
|
||||||
mMessage.setHorizontallyScrolling(false);
|
mMessage.setHorizontallyScrolling(false);
|
||||||
mReplyEnabled = false;
|
|
||||||
|
|
||||||
// build new action bar
|
|
||||||
supportInvalidateOptionsMenu();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Id.target.file:
|
case Id.target.file:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de>
|
* Copyright (C) 2012-2014 Dominik Schürmann <dominik@dominikschuermann.de>
|
||||||
* Copyright (C) 2010 Thialfihar <thi@thialfihar.org>
|
* Copyright (C) 2010 Thialfihar <thi@thialfihar.org>
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -43,7 +43,6 @@ import org.sufficientlysecure.keychain.ui.dialog.PassphraseDialogFragment;
|
|||||||
import org.sufficientlysecure.keychain.util.Choice;
|
import org.sufficientlysecure.keychain.util.Choice;
|
||||||
import org.sufficientlysecure.keychain.util.Log;
|
import org.sufficientlysecure.keychain.util.Log;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
@@ -51,9 +50,6 @@ import android.os.Bundle;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.Messenger;
|
import android.os.Messenger;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
@@ -88,11 +84,6 @@ public class EncryptActivity extends DrawerActivity {
|
|||||||
private EditText mMessage = null;
|
private EditText mMessage = null;
|
||||||
private BootstrapButton mSelectKeysButton = null;
|
private BootstrapButton mSelectKeysButton = null;
|
||||||
|
|
||||||
private boolean mEncryptEnabled = false;
|
|
||||||
private String mEncryptString = "";
|
|
||||||
private boolean mEncryptToClipboardEnabled = false;
|
|
||||||
private String mEncryptToClipboardString = "";
|
|
||||||
|
|
||||||
private CheckBox mSign = null;
|
private CheckBox mSign = null;
|
||||||
private TextView mMainUserId = null;
|
private TextView mMainUserId = null;
|
||||||
private TextView mMainUserIdRest = null;
|
private TextView mMainUserIdRest = null;
|
||||||
@@ -130,42 +121,9 @@ public class EncryptActivity extends DrawerActivity {
|
|||||||
|
|
||||||
private FileDialogFragment mFileDialog;
|
private FileDialogFragment mFileDialog;
|
||||||
|
|
||||||
/**
|
private BootstrapButton mEncryptShare;
|
||||||
* ActionBar menu is created based on class variables to change it at runtime
|
private BootstrapButton mEncryptClipboard;
|
||||||
*/
|
private BootstrapButton mEncryptFile;
|
||||||
@Override
|
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
|
||||||
if (mEncryptToClipboardEnabled) {
|
|
||||||
MenuItem item = menu.add(1, Id.menu.option.encrypt_to_clipboard, 0, mEncryptToClipboardString);
|
|
||||||
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
|
||||||
}
|
|
||||||
if (mEncryptEnabled) {
|
|
||||||
MenuItem item = menu.add(1, Id.menu.option.encrypt, 1, mEncryptString);
|
|
||||||
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
switch (item.getItemId()) {
|
|
||||||
|
|
||||||
case Id.menu.option.encrypt_to_clipboard:
|
|
||||||
encryptToClipboardClicked();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case Id.menu.option.encrypt:
|
|
||||||
encryptClicked();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -366,58 +324,40 @@ public class EncryptActivity extends DrawerActivity {
|
|||||||
updateActionBarButtons();
|
updateActionBarButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set ActionBar buttons based on parameters
|
|
||||||
*
|
|
||||||
* @param encryptEnabled
|
|
||||||
* @param encryptStringRes
|
|
||||||
* @param encryptToClipboardEnabled
|
|
||||||
* @param encryptToClipboardStringRes
|
|
||||||
*/
|
|
||||||
@SuppressLint("NewApi")
|
|
||||||
private void setActionbarButtons(boolean encryptEnabled, int encryptStringRes,
|
|
||||||
boolean encryptToClipboardEnabled, int encryptToClipboardStringRes) {
|
|
||||||
mEncryptEnabled = encryptEnabled;
|
|
||||||
if (encryptEnabled) {
|
|
||||||
mEncryptString = getString(encryptStringRes);
|
|
||||||
}
|
|
||||||
mEncryptToClipboardEnabled = encryptToClipboardEnabled;
|
|
||||||
if (encryptToClipboardEnabled) {
|
|
||||||
mEncryptToClipboardString = getString(encryptToClipboardStringRes);
|
|
||||||
}
|
|
||||||
|
|
||||||
// build new action bar based on these class variables
|
|
||||||
supportInvalidateOptionsMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update ActionBar buttons based on current selection in view
|
* Update ActionBar buttons based on current selection in view
|
||||||
*/
|
*/
|
||||||
private void updateActionBarButtons() {
|
private void updateActionBarButtons() {
|
||||||
switch (mSource.getCurrentView().getId()) {
|
switch (mSource.getCurrentView().getId()) {
|
||||||
case R.id.sourceFile: {
|
case R.id.sourceFile: {
|
||||||
setActionbarButtons(true, R.string.btn_encrypt_file, false, 0);
|
mEncryptShare.setVisibility(View.GONE);
|
||||||
|
mEncryptClipboard.setVisibility(View.GONE);
|
||||||
|
mEncryptFile.setVisibility(View.VISIBLE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case R.id.sourceMessage: {
|
case R.id.sourceMessage: {
|
||||||
mSourceLabel.setText(R.string.label_message);
|
mSourceLabel.setText(R.string.label_message);
|
||||||
|
|
||||||
|
mEncryptShare.setVisibility(View.VISIBLE);
|
||||||
|
mEncryptClipboard.setVisibility(View.VISIBLE);
|
||||||
|
mEncryptFile.setVisibility(View.GONE);
|
||||||
|
|
||||||
if (mMode.getCurrentView().getId() == R.id.modeSymmetric) {
|
if (mMode.getCurrentView().getId() == R.id.modeSymmetric) {
|
||||||
setActionbarButtons(true, R.string.btn_encrypt_and_send, true,
|
mEncryptShare.setEnabled(true);
|
||||||
R.string.btn_encrypt_to_clipboard);
|
mEncryptClipboard.setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
if (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0) {
|
if (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0) {
|
||||||
if (mSecretKeyId == 0) {
|
if (mSecretKeyId == 0) {
|
||||||
setActionbarButtons(false, 0, false, 0);
|
mEncryptShare.setEnabled(false);
|
||||||
|
mEncryptClipboard.setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
setActionbarButtons(true, R.string.btn_sign_and_send, true,
|
mEncryptShare.setEnabled(true);
|
||||||
R.string.btn_sign_to_clipboard);
|
mEncryptClipboard.setEnabled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setActionbarButtons(true, R.string.btn_encrypt_and_send, true,
|
mEncryptShare.setEnabled(true);
|
||||||
R.string.btn_encrypt_to_clipboard);
|
mEncryptClipboard.setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -889,6 +829,28 @@ public class EncryptActivity extends DrawerActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mEncryptClipboard = (BootstrapButton) findViewById(R.id.action_encrypt_clipboard);
|
||||||
|
mEncryptClipboard.setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
encryptToClipboardClicked();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mEncryptShare = (BootstrapButton) findViewById(R.id.action_encrypt_share);
|
||||||
|
mEncryptShare.setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
encryptClicked();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mEncryptFile = (BootstrapButton) findViewById(R.id.action_encrypt_file);
|
||||||
|
mEncryptFile.setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
encryptClicked();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateView() {
|
private void updateView() {
|
||||||
|
|||||||
@@ -3,25 +3,25 @@
|
|||||||
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/drawer_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true" >
|
android:fillViewport="true">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp" >
|
android:paddingRight="10dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/signature"
|
android:id="@+id/signature"
|
||||||
@@ -31,11 +31,11 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="4dp"
|
android:padding="4dp"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp" >
|
android:paddingRight="10dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ic_signature"
|
android:id="@+id/ic_signature"
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="5dip" >
|
android:paddingLeft="5dip">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/mainUserId"
|
android:id="@+id/mainUserId"
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/sourcePrevious"
|
android:id="@+id/sourcePrevious"
|
||||||
@@ -106,14 +106,14 @@
|
|||||||
android:id="@+id/source"
|
android:id="@+id/source"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
android:layout_weight="1" >
|
android:layout_weight="1">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/sourceMessage"
|
android:id="@+id/sourceMessage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="4dp" >
|
android:padding="4dp">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/message"
|
android:id="@+id/message"
|
||||||
@@ -129,12 +129,12 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="4dp" >
|
android:padding="4dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/filename"
|
android:id="@+id/filename"
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/deleteAfterDecryption"
|
android:id="@+id/deleteAfterDecryption"
|
||||||
@@ -168,6 +168,29 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ViewFlipper>
|
</ViewFlipper>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/SectionHeader"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:text="@string/section_decrypt_verify" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="4dp">
|
||||||
|
|
||||||
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
|
android:id="@+id/action_decrypt"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:text="@string/btn_decrypt_verify"
|
||||||
|
bootstrapbutton:bb_icon_left="fa-unlock"
|
||||||
|
bootstrapbutton:bb_type="info" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -3,25 +3,25 @@
|
|||||||
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/drawer_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true" >
|
android:fillViewport="true">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp" >
|
android:paddingRight="10dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="4dp" >
|
android:padding="4dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/modePrevious"
|
android:id="@+id/modePrevious"
|
||||||
@@ -48,19 +48,19 @@
|
|||||||
<ViewFlipper
|
<ViewFlipper
|
||||||
android:id="@+id/mode"
|
android:id="@+id/mode"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/modeAsymmetric"
|
android:id="@+id/modeAsymmetric"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="4dp" >
|
android:padding="4dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/sign"
|
android:id="@+id/sign"
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="16dp" >
|
android:paddingLeft="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/mainUserId"
|
android:id="@+id/mainUserId"
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingBottom="3dip" >
|
android:paddingBottom="3dip">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/label_selectPublicKeys"
|
android:id="@+id/label_selectPublicKeys"
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="4dp"
|
android:padding="4dp"
|
||||||
android:stretchColumns="1" >
|
android:stretchColumns="1">
|
||||||
|
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="4dp" >
|
android:padding="4dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/sourcePrevious"
|
android:id="@+id/sourcePrevious"
|
||||||
@@ -203,14 +203,14 @@
|
|||||||
android:id="@+id/source"
|
android:id="@+id/source"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
android:layout_weight="1" >
|
android:layout_weight="1">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/sourceMessage"
|
android:id="@+id/sourceMessage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="4dp" >
|
android:padding="4dp">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/message"
|
android:id="@+id/message"
|
||||||
@@ -225,12 +225,12 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="4dp" >
|
android:padding="4dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/filename"
|
android:id="@+id/filename"
|
||||||
@@ -253,7 +253,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/label_fileCompression"
|
android:id="@+id/label_fileCompression"
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/deleteAfterEncryption"
|
android:id="@+id/deleteAfterEncryption"
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/asciiArmour"
|
android:id="@+id/asciiArmour"
|
||||||
@@ -299,6 +299,50 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ViewFlipper>
|
</ViewFlipper>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/SectionHeader"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:text="@string/section_encrypt_and_or_sign" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="4dp">
|
||||||
|
|
||||||
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
|
android:id="@+id/action_encrypt_share"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/btn_share"
|
||||||
|
bootstrapbutton:bb_icon_left="fa-lock"
|
||||||
|
bootstrapbutton:bb_type="info" />
|
||||||
|
|
||||||
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
|
android:id="@+id/action_encrypt_clipboard"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/btn_clipboard"
|
||||||
|
bootstrapbutton:bb_icon_left="fa-lock"
|
||||||
|
bootstrapbutton:bb_type="info" />
|
||||||
|
|
||||||
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
|
android:id="@+id/action_encrypt_file"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:text="@string/btn_encrypt_file"
|
||||||
|
bootstrapbutton:bb_icon_left="fa-lock"
|
||||||
|
bootstrapbutton:bb_type="info" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
|||||||
@@ -42,15 +42,13 @@
|
|||||||
<string name="section_signing_key">Your Key used for Signing</string>
|
<string name="section_signing_key">Your Key used for Signing</string>
|
||||||
<string name="section_upload_key">Upload Key</string>
|
<string name="section_upload_key">Upload Key</string>
|
||||||
<string name="section_key_server">Key Server</string>
|
<string name="section_key_server">Key Server</string>
|
||||||
|
<string name="section_encrypt_and_or_sign">Encrypt and/or Sign</string>
|
||||||
|
<string name="section_decrypt_verify">Decrypt and Verify</string>
|
||||||
|
|
||||||
<!-- button -->
|
<!-- button -->
|
||||||
<string name="btn_sign_to_clipboard">Sign (Clipboard)</string>
|
|
||||||
<string name="btn_encrypt_to_clipboard">Encrypt to Clipboard</string>
|
|
||||||
<string name="btn_encrypt_and_send">Encrypt and send…</string>
|
|
||||||
<string name="btn_sign_and_send">Sign and send…</string>
|
|
||||||
<string name="btn_sign">Sign</string>
|
<string name="btn_sign">Sign</string>
|
||||||
<string name="btn_decrypt">Decrypt</string>
|
<string name="btn_decrypt">Decrypt</string>
|
||||||
<string name="btn_verify">Verify</string>
|
<string name="btn_decrypt_verify">Decrypt and Verify</string>
|
||||||
<string name="btn_select_encrypt_keys">Select Recipients</string>
|
<string name="btn_select_encrypt_keys">Select Recipients</string>
|
||||||
<string name="btn_encrypt_file">Encrypt File</string>
|
<string name="btn_encrypt_file">Encrypt File</string>
|
||||||
<string name="btn_save">Save</string>
|
<string name="btn_save">Save</string>
|
||||||
@@ -64,6 +62,9 @@
|
|||||||
<string name="btn_export_to_server">Upload To Key Server</string>
|
<string name="btn_export_to_server">Upload To Key Server</string>
|
||||||
<string name="btn_next">Next</string>
|
<string name="btn_next">Next</string>
|
||||||
<string name="btn_back">Back</string>
|
<string name="btn_back">Back</string>
|
||||||
|
<string name="btn_clipboard">Clipboard</string>
|
||||||
|
<string name="btn_share">Share with…</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- menu -->
|
<!-- menu -->
|
||||||
<string name="menu_preferences">Settings</string>
|
<string name="menu_preferences">Settings</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user