diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-05-14 16:02:28 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-05-14 16:02:28 +0200 |
commit | 2f95100d88954db389cba8e615390795d121c1c8 (patch) | |
tree | 1bf4ffb29bb83fac33ba2ed7c84fb1d6a8af2bd4 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java | |
parent | 90ac60b6db0637fbefbce5cb2cd80a64f5bb708d (diff) | |
parent | 638554f2560b3c5fd36ca9b4ba205cb5a999b84b (diff) | |
download | open-keychain-2f95100d88954db389cba8e615390795d121c1c8.tar.gz open-keychain-2f95100d88954db389cba8e615390795d121c1c8.tar.bz2 open-keychain-2f95100d88954db389cba8e615390795d121c1c8.zip |
Merge remote-tracking branch 'origin/master' into wrapped-key-ring
Conflicts:
OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java
OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java
OpenKeychain/src/main/res/values/strings.xml
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java index 866888bb2..f911318a0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java @@ -18,6 +18,9 @@ package org.sufficientlysecure.keychain; import android.app.Application; +import android.content.Context; +import android.graphics.PorterDuff; +import android.graphics.drawable.Drawable; import android.os.Environment; import org.spongycastle.jce.provider.BouncyCastleProvider; @@ -70,5 +73,22 @@ public class KeychainApplication extends Application { // that the directory doesn't exist at this point } } + + brandGlowEffect(getApplicationContext(), + getApplicationContext().getResources().getColor(R.color.emphasis)); + } + + static void brandGlowEffect(Context context, int brandColor) { + // terrible hack to brand the edge overscroll glow effect + // https://gist.github.com/menny/7878762#file-brandgloweffect_full-java + + //glow + int glowDrawableId = context.getResources().getIdentifier("overscroll_glow", "drawable", "android"); + Drawable androidGlow = context.getResources().getDrawable(glowDrawableId); + androidGlow.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN); + //edge + int edgeDrawableId = context.getResources().getIdentifier("overscroll_edge", "drawable", "android"); + Drawable androidEdge = context.getResources().getDrawable(edgeDrawableId); + androidEdge.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN); } } |