diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-02-27 23:57:00 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-02-27 23:57:00 +0100 |
commit | dc38031b4e264271c131e413fbfcf02b0f993276 (patch) | |
tree | 9c69e072101a5735557a371269dc01dc4d120941 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui | |
parent | 582caaba97c288de88b7a957cdf1b6f5bc84ed31 (diff) | |
parent | c46fdef203dc400e71186fb19c962893d56950b7 (diff) | |
download | open-keychain-dc38031b4e264271c131e413fbfcf02b0f993276.tar.gz open-keychain-dc38031b4e264271c131e413fbfcf02b0f993276.tar.bz2 open-keychain-dc38031b4e264271c131e413fbfcf02b0f993276.zip |
Merge branch 'development' of github.com:open-keychain/open-keychain into development
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyFingerprintActivity.java | 4 | ||||
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java | 33 |
2 files changed, 32 insertions, 5 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyFingerprintActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyFingerprintActivity.java index 777288e69..c75f6d838 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyFingerprintActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyFingerprintActivity.java @@ -83,8 +83,8 @@ public class CertifyFingerprintActivity extends BaseActivity { protected void onActivityResult(int requestCode, int resultCode, Intent data) { // if a result has been returned, display a notify if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) { - OperationResult result = data.getParcelableExtra(OperationResult.EXTRA_RESULT); - result.createNotify(this).show(); + setResult(RESULT_OK, data); + finish(); } else { super.onActivityResult(requestCode, resultCode, data); } 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 f6c56d965..bbf35e497 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java @@ -18,11 +18,14 @@ package org.sufficientlysecure.keychain.ui; +import android.animation.ArgbEvaluator; +import android.animation.ObjectAnimator; import android.annotation.TargetApi; import android.app.ActivityOptions; import android.content.Intent; import android.database.Cursor; import android.graphics.Bitmap; +import android.graphics.Color; import android.net.Uri; import android.nfc.NdefMessage; import android.nfc.NdefRecord; @@ -717,6 +720,8 @@ public class ViewKeyActivity extends BaseActivity implements } } + int mPreviousColor = 0; + @Override public void onLoadFinished(Loader<Cursor> loader, Cursor data) { /* TODO better error handling? May cause problems when a key is deleted, @@ -861,9 +866,31 @@ public class ViewKeyActivity extends BaseActivity implements mFab.setVisibility(View.VISIBLE); } } - mToolbar.setBackgroundColor(color); - mStatusBar.setBackgroundColor(color); - mBigToolbar.setBackgroundColor(color); + + if (mPreviousColor == 0 || mPreviousColor == color) { + mToolbar.setBackgroundColor(color); + mStatusBar.setBackgroundColor(color); + mBigToolbar.setBackgroundColor(color); + mPreviousColor = color; + } else { + ObjectAnimator colorFade1 = + ObjectAnimator.ofObject(mToolbar, "backgroundColor", + new ArgbEvaluator(), mPreviousColor, color); + ObjectAnimator colorFade2 = + ObjectAnimator.ofObject(mStatusBar, "backgroundColor", + new ArgbEvaluator(), mPreviousColor, color); + ObjectAnimator colorFade3 = + ObjectAnimator.ofObject(mBigToolbar, "backgroundColor", + new ArgbEvaluator(), mPreviousColor, color); + + colorFade1.setDuration(1200); + colorFade2.setDuration(1200); + colorFade3.setDuration(1200); + colorFade1.start(); + colorFade2.start(); + colorFade3.start(); + mPreviousColor = color; + } mStatusImage.setAlpha(80); |