diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-03-29 11:43:22 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-03-29 11:43:22 +0200 |
commit | 6244834096727cfc1aaaeba7845a6d9cfe27d2b0 (patch) | |
tree | bc532e86b2bfca9afbcfcfc4c383b48ecb287ea4 /src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java | |
parent | 0c0676b7dbf87e24ebcc4714adfb10d91e3d72b8 (diff) |
Implements FS#173: Move access to colors to separate helper class
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java index 23601f44..1501c78a 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java @@ -22,6 +22,7 @@ import com.soundcloud.android.crop.Crop; import java.io.File; import java.io.FileNotFoundException; +import de.thedevstack.conversationsplus.ConversationsPlusColors; import de.thedevstack.conversationsplus.utils.ImageUtil; import de.thedevstack.conversationsplus.Config; import de.thedevstack.conversationsplus.R; @@ -85,7 +86,7 @@ public class PublishProfilePictureActivity extends XmppActivity { @Override public void run() { hintOrWarning.setText(errorCode); - hintOrWarning.setTextColor(getWarningTextColor()); + hintOrWarning.setTextColor(ConversationsPlusColors.warning()); publishButton.setText(R.string.publish); enablePublishButton(); } @@ -245,7 +246,7 @@ public class PublishProfilePictureActivity extends XmppActivity { } if (!support) { this.hintOrWarning - .setTextColor(getWarningTextColor()); + .setTextColor(ConversationsPlusColors.warning()); this.hintOrWarning .setText(R.string.error_publish_avatar_no_server_support); } @@ -288,7 +289,7 @@ public class PublishProfilePictureActivity extends XmppActivity { if (bm == null) { disablePublishButton(); - this.hintOrWarning.setTextColor(getWarningTextColor()); + this.hintOrWarning.setTextColor(ConversationsPlusColors.warning()); this.hintOrWarning .setText(R.string.error_publish_avatar_converting); return; @@ -298,10 +299,10 @@ public class PublishProfilePictureActivity extends XmppActivity { enablePublishButton(); this.publishButton.setText(R.string.publish); this.hintOrWarning.setText(R.string.publish_avatar_explanation); - this.hintOrWarning.setTextColor(getPrimaryTextColor()); + this.hintOrWarning.setTextColor(ConversationsPlusColors.primaryText()); } else { disablePublishButton(); - this.hintOrWarning.setTextColor(getWarningTextColor()); + this.hintOrWarning.setTextColor(ConversationsPlusColors.warning()); this.hintOrWarning .setText(R.string.error_publish_avatar_no_server_support); } @@ -316,12 +317,12 @@ public class PublishProfilePictureActivity extends XmppActivity { protected void enablePublishButton() { this.publishButton.setEnabled(true); - this.publishButton.setTextColor(getPrimaryTextColor()); + this.publishButton.setTextColor(ConversationsPlusColors.primaryText()); } protected void disablePublishButton() { this.publishButton.setEnabled(false); - this.publishButton.setTextColor(getSecondaryTextColor()); + this.publishButton.setTextColor(ConversationsPlusColors.secondaryText()); } public void refreshUiReal() { |