aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/XmppActivity.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2020-01-26 20:18:13 +0100
committerChristian Schneppe <christian.schneppe@pix-art.de>2020-01-26 20:18:13 +0100
commit2f27378f1635fad2501b30e4080100418a00e193 (patch)
tree6ad1f6d1e8e34da115b4006e8e89dcedfb1230d3 /src/main/java/de/pixart/messenger/ui/XmppActivity.java
parent0b857a81db69d51242a9e728ad469bc0a3001f6c (diff)
use more material style
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/XmppActivity.java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index e1abbe593..ac2289d92 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -114,6 +114,8 @@ public abstract class XmppActivity extends ActionBarActivity {
public boolean xmppConnectionServiceBound = false;
protected int mColorWarningButton;
+ protected int mColorWarningText;
+ protected int mColorDefaultButtonText;
protected int mColorWhite;
protected static final String FRAGMENT_TAG_DIALOG = "dialog";
@@ -406,9 +408,12 @@ public abstract class XmppActivity extends ActionBarActivity {
this.isCameraFeatureAvailable = getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);
if (isDarkTheme()) {
mColorWarningButton = ContextCompat.getColor(this, R.color.warning_button_dark);
+ mColorWarningText = ContextCompat.getColor(this, R.color.warning_button);
} else {
mColorWarningButton = ContextCompat.getColor(this, R.color.warning_button);
+ mColorWarningText = ContextCompat.getColor(this, R.color.warning_button_dark);
}
+ mColorDefaultButtonText = ContextCompat.getColor(this, R.color.realwhite);
mColorWhite = ContextCompat.getColor(this, R.color.white70);
this.mUsingEnterKey = usingEnterKey();
}
@@ -676,8 +681,7 @@ public abstract class XmppActivity extends ActionBarActivity {
protected void displayErrorDialog(final int errorCode) {
runOnUiThread(() -> {
- Builder builder = new Builder(
- XmppActivity.this);
+ AlertDialog.Builder builder = new AlertDialog.Builder(XmppActivity.this);
builder.setIconAttribute(android.R.attr.alertDialogIcon);
builder.setTitle(getString(R.string.error));
builder.setMessage(errorCode);
@@ -945,6 +949,14 @@ public abstract class XmppActivity extends ActionBarActivity {
return this.mColorWarningButton;
}
+ public int getWarningTextColor() {
+ return this.mColorWarningText;
+ }
+
+ public int getDefaultButtonTextColor() {
+ return this.mColorDefaultButtonText;
+ }
+
public int getPixel(int dp) {
DisplayMetrics metrics = getResources().getDisplayMetrics();
return ((int) (dp * metrics.density));