aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2020-02-06 21:19:21 +0100
committerChristian Schneppe <christian.schneppe@pix-art.de>2020-02-06 21:19:21 +0100
commitbaa5ba17cd1578bd3859e4ff306cf6ffc705d6f9 (patch)
tree4eadaf801fa78ffc0e38c725659966113583f15a /src
parent3aac32f7aa72ab6339cf7f20322ec414c32e6677 (diff)
fix some button colors
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java10
-rw-r--r--src/main/res/color/button_state_color.xml5
-rw-r--r--src/main/res/layout/activity_edit_account.xml3
-rw-r--r--src/main/res/values/attrs.xml2
-rw-r--r--src/main/res/values/styles.xml6
-rw-r--r--src/main/res/values/themes.xml2
6 files changed, 16 insertions, 12 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 530180fae..152dd8fc1 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -291,13 +291,9 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
}
};
- private final OnClickListener mCancelButtonClickListener = new OnClickListener() {
-
- @Override
- public void onClick(final View v) {
- deleteAccountAndReturnIfNecessary();
- finish();
- }
+ private final OnClickListener mCancelButtonClickListener = v -> {
+ deleteAccountAndReturnIfNecessary();
+ finish();
};
private Toast mFetchingMamPrefsToast;
private String mSavedInstanceAccount;
diff --git a/src/main/res/color/button_state_color.xml b/src/main/res/color/button_state_color.xml
new file mode 100644
index 000000000..db794d038
--- /dev/null
+++ b/src/main/res/color/button_state_color.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="?attr/button_text_color_disabled" />
+ <item android:color="?attr/colorAccent"/>
+</selector> \ No newline at end of file
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
index 1be75305b..a1646f553 100644
--- a/src/main/res/layout/activity_edit_account.xml
+++ b/src/main/res/layout/activity_edit_account.xml
@@ -860,8 +860,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
- android:text="@string/clear_other_devices"
- android:textColor="@color/accent" />
+ android:text="@string/clear_other_devices" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
diff --git a/src/main/res/values/attrs.xml b/src/main/res/values/attrs.xml
index 16a35eb2b..801b0742b 100644
--- a/src/main/res/values/attrs.xml
+++ b/src/main/res/values/attrs.xml
@@ -17,6 +17,8 @@
<attr name="text_Color_Main" format="reference|color" />
+ <attr name="button_text_color_disabled" format="reference|color" />
+
<attr name="color_background_tertiary" format="reference|color" />
<attr name="color_background_secondary" format="reference|color" />
<attr name="color_background_primary" format="reference|color" />
diff --git a/src/main/res/values/styles.xml b/src/main/res/values/styles.xml
index 0818bbd5b..185699519 100644
--- a/src/main/res/values/styles.xml
+++ b/src/main/res/values/styles.xml
@@ -57,16 +57,16 @@
<style name="Widget.Conversations.Button.Borderless" parent="@style/Widget.MaterialComponents.Button.TextButton">
<item name="android:textSize">?TextSizeBody2</item>
- <item name="android:textColor">?attr/colorAccent</item>
+ <item name="android:textColor">@color/button_state_color</item>
</style>
<style name="Widget.Conversations.Button.Outline" parent="@style/Widget.MaterialComponents.Button.OutlinedButton">
<item name="android:textSize">?TextSizeBody2</item>
<item name="strokeColor">?attr/colorAccent</item>
- <item name="android:textColor">?attr/colorAccent</item>
+ <item name="android:textColor">@color/button_state_color</item>
</style>
- <style name="Widget.Conversations.Button" parent="@style/Widget.MaterialComponents.Button.UnelevatedButton">
+ <style name="Widget.Conversations.Button" parent="@style/Widget.MaterialComponents.Button">
<item name="android:textSize">?TextSizeBody2</item>
<item name="android:textColor">@color/realwhite</item>
</style>
diff --git a/src/main/res/values/themes.xml b/src/main/res/values/themes.xml
index 54e6a4356..d8e7caf82 100644
--- a/src/main/res/values/themes.xml
+++ b/src/main/res/values/themes.xml
@@ -9,6 +9,7 @@
<item name="colorControlNormal">@color/accent</item>
<item name="colorControlActivated">@color/accent</item>
<item name="text_Color_Main">@color/realblack</item>
+ <item name="button_text_color_disabled">@color/grey500</item>
<item name="color_background_primary">@color/grey50</item>
<item name="color_background_secondary">@color/grey200</item>
@@ -167,6 +168,7 @@
<item name="colorControlNormal">@color/accent</item>
<item name="colorControlActivated">@color/accent</item>
<item name="text_Color_Main">@color/realwhite</item>
+ <item name="button_text_color_disabled">@color/grey500</item>
<item name="android:navigationBarColor" tools:targetApi="21">@color/black</item>
<item name="color_background_primary">@color/grey700</item>