diff --git a/OpenPGP-Keychain/res/layout/key_server_export.xml b/OpenPGP-Keychain/res/layout/key_server_export.xml
index bfc4278c4..cfbf7d79d 100644
--- a/OpenPGP-Keychain/res/layout/key_server_export.xml
+++ b/OpenPGP-Keychain/res/layout/key_server_export.xml
@@ -1,18 +1,41 @@
-
+ android:layout_height="match_parent" >
-
-
-
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:orientation="vertical" >
-
\ No newline at end of file
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OpenPGP-Keychain/res/values/strings.xml b/OpenPGP-Keychain/res/values/strings.xml
index 21b834f47..b2e17c3be 100644
--- a/OpenPGP-Keychain/res/values/strings.xml
+++ b/OpenPGP-Keychain/res/values/strings.xml
@@ -1,21 +1,4 @@
-
-
@@ -41,7 +24,7 @@
Export Keys
Key Not Found
Query Key Server
- Export to Key Server
+ Upload to Key Server
Unknown Signature Key
Sign Key
Key Details
@@ -59,7 +42,8 @@
Actions
Your Key used for Signing
Upload Key
-
+ Key Server
+
Sign (Clipboard)
Encrypt to Clipboard
@@ -78,7 +62,7 @@
Change Passphrase
Set Passphrase
Search
- Export To Server
+ Upload To Key Server
Next
Back
@@ -98,8 +82,8 @@
Edit key
Search
Import from key server
- Update from server
- Export to server
+ Update from key server
+ Upload to key server
Share with…
Share with QR Code
Share with NFC
@@ -139,7 +123,7 @@
Name
Comment
Email
- Upload key to selected keyserver after signing
+ Upload key to selected key server after signing
Fingerprint
Select
1 Selected
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerUploadActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerUploadActivity.java
index 2bf19ab92..9dca1094f 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerUploadActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerUploadActivity.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Dominik Schürmann
+ * Copyright (C) 2012-2014 Dominik Schürmann
* Copyright (C) 2011 Senecaso
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,13 +18,10 @@
package org.sufficientlysecure.keychain.ui;
import org.sufficientlysecure.keychain.Constants;
+import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.helper.Preferences;
import org.sufficientlysecure.keychain.service.KeychainIntentService;
import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler;
-import org.sufficientlysecure.keychain.R;
-
-import com.actionbarsherlock.app.SherlockFragmentActivity;
-import com.actionbarsherlock.view.MenuItem;
import android.app.ProgressDialog;
import android.content.Intent;
@@ -34,10 +31,12 @@ import android.os.Messenger;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
-import android.widget.Button;
import android.widget.Spinner;
import android.widget.Toast;
+import com.actionbarsherlock.app.SherlockFragmentActivity;
+import com.beardedhen.androidbootstrap.BootstrapButton;
+
/**
* gpg --send-key activity
*
@@ -49,28 +48,10 @@ public class KeyServerUploadActivity extends SherlockFragmentActivity {
public static final String ACTION_EXPORT_KEY_TO_SERVER = Constants.INTENT_PREFIX
+ "EXPORT_KEY_TO_SERVER";
- public static final String EXTRA_KEYRING_ROW_ID = "key_id";
+ public static final String EXTRA_KEYRING_ROW_ID = "key_row_id";
- private Button export;
- private Spinner keyServer;
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
-
- case android.R.id.home:
- // app icon in Action Bar clicked; go home
- Intent intent = new Intent(this, KeyListPublicActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(intent);
- return true;
-
- default:
- break;
-
- }
- return false;
- }
+ private BootstrapButton mUploadButton;
+ private Spinner mKeyServerSpinner;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -78,21 +59,21 @@ public class KeyServerUploadActivity extends SherlockFragmentActivity {
setContentView(R.layout.key_server_export);
- export = (Button) findViewById(R.id.btn_export_to_server);
- keyServer = (Spinner) findViewById(R.id.sign_key_keyserver);
+ mUploadButton = (BootstrapButton) findViewById(R.id.btn_export_to_server);
+ mKeyServerSpinner = (Spinner) findViewById(R.id.sign_key_keyserver);
ArrayAdapter adapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_item, Preferences.getPreferences(this)
.getKeyServers());
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- keyServer.setAdapter(adapter);
+ mKeyServerSpinner.setAdapter(adapter);
if (adapter.getCount() > 0) {
- keyServer.setSelection(0);
+ mKeyServerSpinner.setSelection(0);
} else {
- export.setEnabled(false);
+ mUploadButton.setEnabled(false);
}
- export.setOnClickListener(new OnClickListener() {
+ mUploadButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
uploadKey();
@@ -112,14 +93,14 @@ public class KeyServerUploadActivity extends SherlockFragmentActivity {
int keyRingId = getIntent().getIntExtra(EXTRA_KEYRING_ROW_ID, -1);
data.putInt(KeychainIntentService.UPLOAD_KEY_KEYRING_ROW_ID, keyRingId);
- String server = (String) keyServer.getSelectedItem();
+ String server = (String) mKeyServerSpinner.getSelectedItem();
data.putString(KeychainIntentService.UPLOAD_KEY_SERVER, server);
intent.putExtra(KeychainIntentService.EXTRA_DATA, data);
// Message is received after uploading is done in ApgService
- KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(this, R.string.progress_exporting,
- ProgressDialog.STYLE_HORIZONTAL) {
+ KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(this,
+ R.string.progress_exporting, ProgressDialog.STYLE_HORIZONTAL) {
public void handleMessage(Message message) {
// handle messages by standard ApgHandler first
super.handleMessage(message);