diff options
author | Daniel Haß <mail@danielhass.de> | 2014-04-09 14:39:59 +0200 |
---|---|---|
committer | Daniel Haß <mail@danielhass.de> | 2014-04-09 15:14:29 +0200 |
commit | 2a9eaaa1fbab517df00f0f2f0367acc66a321b3c (patch) | |
tree | 02d99f0a434a56648c99bce40f82a95ddc68f8b1 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui | |
parent | 01991aa127b491ae52b98a170967829313aa5236 (diff) | |
download | open-keychain-2a9eaaa1fbab517df00f0f2f0367acc66a321b3c.tar.gz open-keychain-2a9eaaa1fbab517df00f0f2f0367acc66a321b3c.tar.bz2 open-keychain-2a9eaaa1fbab517df00f0f2f0367acc66a321b3c.zip |
Replaced Toasts in ViewKeyActivity
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java index e01f3397b..d8a334032 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java @@ -30,7 +30,8 @@ import android.support.v7.app.ActionBarActivity; import android.view.Menu; import android.view.MenuItem; import android.view.Window; -import android.widget.Toast; + +import com.devspark.appmsg.AppMsg; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.Id; @@ -194,8 +195,8 @@ public class ViewKeyActivity extends ActionBarActivity { String fingerprint = PgpKeyHelper.convertFingerprintToHex(data); content = Constants.FINGERPRINT_SCHEME + ":" + fingerprint; } else { - Toast.makeText(getApplicationContext(), "Bad key selected!", - Toast.LENGTH_LONG).show(); + AppMsg.makeText(this, "Bad key selected!", + AppMsg.STYLE_ALERT).show(); return; } } else { @@ -211,8 +212,8 @@ public class ViewKeyActivity extends ActionBarActivity { // Android will fail with android.os.TransactionTooLargeException if key is too big // see http://www.lonestarprod.com/?p=34 if (content.length() >= 86389) { - Toast.makeText(getApplicationContext(), R.string.key_too_big_for_sharing, - Toast.LENGTH_LONG).show(); + AppMsg.makeText(this, R.string.key_too_big_for_sharing, + AppMsg.STYLE_ALERT).show(); return; } } catch (ProviderHelper.NotFoundException e) { @@ -247,11 +248,14 @@ public class ViewKeyActivity extends ActionBarActivity { this, new long[]{masterKeyId}); ClipboardReflection.copyToClipboard(this, keyringArmored.get(0)); - Toast.makeText(getApplicationContext(), R.string.key_copied_to_clipboard, Toast.LENGTH_LONG) - .show(); + AppMsg.makeText(this, R.string.key_copied_to_clipboard, AppMsg.STYLE_INFO) + .show(); } catch (ProviderHelper.NotFoundException e) { Log.e(Constants.TAG, "key not found!", e); } + ClipboardReflection.copyToClipboard(this, keyringArmored.get(0)); + AppMsg.makeText(this, R.string.key_copied_to_clipboard, AppMsg.STYLE_INFO) + .show(); } private void shareNfc() { |