diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/XmppActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index b46ec8296..95a896cde 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -42,6 +42,7 @@ import android.os.IBinder; import android.os.PowerManager; import android.os.SystemClock; import android.preference.PreferenceManager; +import android.support.v4.content.ContextCompat; import android.text.InputType; import android.util.DisplayMetrics; import android.util.Pair; @@ -400,16 +401,16 @@ public abstract class XmppActivity extends Activity { EmojiManager.install(new IosEmojiProvider()); // This line needs to be executed before any usage of EmojiTextView or EmojiEditText. metrics = getResources().getDisplayMetrics(); ExceptionHelper.init(getApplicationContext()); - mPrimaryTextColor = getResources().getColor(R.color.black87); - mSecondaryTextColor = getResources().getColor(R.color.black54); - mTertiaryTextColor = getResources().getColor(R.color.black12); - mColorRed = getResources().getColor(R.color.red800); - mColorWhite = getResources().getColor(R.color.white70); - mColorOrange = getResources().getColor(R.color.orange500); - mColorGreen = getResources().getColor(R.color.realgreen); - mPrimaryColor = getResources().getColor(R.color.primary); - mPrimaryBackgroundColor = getResources().getColor(R.color.grey50); - mSecondaryBackgroundColor = getResources().getColor(R.color.grey200); + mPrimaryTextColor = ContextCompat.getColor(this, R.color.black87); + mSecondaryTextColor = ContextCompat.getColor(this, R.color.black54); + mTertiaryTextColor = ContextCompat.getColor(this, R.color.black12); + mColorRed = ContextCompat.getColor(this, R.color.red800); + mColorWhite = ContextCompat.getColor(this, R.color.white70); + mColorOrange = ContextCompat.getColor(this, R.color.orange500); + mColorGreen = ContextCompat.getColor(this, R.color.realgreen); + mPrimaryColor = ContextCompat.getColor(this, R.color.primary); + mPrimaryBackgroundColor = ContextCompat.getColor(this, R.color.grey50); + mSecondaryBackgroundColor = ContextCompat.getColor(this, R.color.grey200); this.mTheme = findTheme(); setTheme(this.mTheme); this.mUsingEnterKey = usingEnterKey(); |