From 96e6604d9eed10d08534ddb6c7a33b7ec9dfc68e Mon Sep 17 00:00:00 2001 From: steckbrief Date: Fri, 4 Dec 2015 16:34:50 +0100 Subject: Fixes FS#75 - Change color names to reasonable names --- .../services/NotificationService.java | 2 +- .../conversationsplus/ui/XmppActivity.java | 14 +++-- .../ui/dialogs/MessageDetailsDialog.java | 9 +--- src/main/res/layout/account_row.xml | 4 +- src/main/res/layout/activity_about.xml | 2 +- src/main/res/layout/activity_change_password.xml | 18 +++---- src/main/res/layout/activity_contact_details.xml | 10 ++-- src/main/res/layout/activity_edit_account.xml | 60 +++++++++++----------- src/main/res/layout/activity_muc_details.xml | 10 ++-- .../layout/activity_publish_profile_picture.xml | 12 ++--- src/main/res/layout/activity_verify_otr.xml | 20 ++++---- src/main/res/layout/contact.xml | 6 +-- src/main/res/layout/contact_key.xml | 4 +- src/main/res/layout/conversation_list_row.xml | 8 +-- src/main/res/layout/create_contact_dialog.xml | 8 +-- src/main/res/layout/dialog_message_details.xml | 2 +- src/main/res/layout/fragment_conversation.xml | 2 +- src/main/res/layout/join_conference_dialog.xml | 8 +-- src/main/res/layout/message_received.xml | 6 +-- src/main/res/layout/message_sent.xml | 6 +-- src/main/res/layout/message_status.xml | 2 +- src/main/res/layout/quickedit.xml | 2 +- src/main/res/values/colors.xml | 33 +++++++----- 23 files changed, 124 insertions(+), 124 deletions(-) (limited to 'src/main') diff --git a/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java b/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java index dd448360..9183e70c 100644 --- a/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java +++ b/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java @@ -171,7 +171,7 @@ public class NotificationService { } private void setNotificationColor(final Builder mBuilder) { - mBuilder.setColor(mXmppConnectionService.getResources().getColor(R.color.green500)); + mBuilder.setColor(mXmppConnectionService.getResources().getColor(R.color.notification)); } private void updateNotification(final boolean notify) { diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/XmppActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/XmppActivity.java index 15a614d4..312c4223 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/XmppActivity.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/XmppActivity.java @@ -333,14 +333,12 @@ public abstract class XmppActivity extends Activity { super.onCreate(savedInstanceState); metrics = getResources().getDisplayMetrics(); ExceptionHelper.init(getApplicationContext()); - mPrimaryTextColor = getResources().getColor(R.color.black87); - mSecondaryTextColor = getResources().getColor(R.color.black54); - mColorRed = getResources().getColor(R.color.red500); - mColorOrange = getResources().getColor(R.color.orange500); - mColorGreen = getResources().getColor(R.color.green500); - mPrimaryColor = getResources().getColor(R.color.green500); - mPrimaryBackgroundColor = getResources().getColor(R.color.grey50); - mSecondaryBackgroundColor = getResources().getColor(R.color.grey200); + mPrimaryTextColor = getResources().getColor(R.color.primaryText); + mSecondaryTextColor = getResources().getColor(R.color.secondaryText); + mColorRed = getResources().getColor(R.color.warning); + mColorGreen = getResources().getColor(R.color.online); + mPrimaryBackgroundColor = getResources().getColor(R.color.primaryBackground); + mSecondaryBackgroundColor = getResources().getColor(R.color.secondaryBackground); this.mTheme = findTheme(); setTheme(this.mTheme); this.mUsingEnterKey = ConversationsPlusPreferences.displayEnterKey(); diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java b/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java index 670fb9ee..a6ee21e6 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java @@ -73,34 +73,29 @@ public class MessageDetailsDialog extends AbstractAlertDialog { protected void displayMessageStatusInfo(View view, Message message) { TextView msgStatusTextView = (TextView) view.findViewById(R.id.dlgMsgDetMsgStatus); int msgStatusResId; - int msgStatusColorResId; + int msgStatusColorResId = R.color.primaryText; switch (message.getStatus()) { case Message.STATUS_WAITING: msgStatusResId = R.string.dlg_msg_details_msg_status_waiting; - msgStatusColorResId = R.color.black87; break; case Message.STATUS_UNSEND: msgStatusResId = R.string.dlg_msg_details_msg_status_unsend; - msgStatusColorResId = R.color.black87; break; case Message.STATUS_OFFERED: msgStatusResId = R.string.dlg_msg_details_msg_status_offered; - msgStatusColorResId = R.color.black87; break; case Message.STATUS_SEND_FAILED: msgStatusResId = R.string.dlg_msg_details_msg_status_failed; - msgStatusColorResId = R.color.red500; + msgStatusColorResId = R.color.error; break; case Message.STATUS_RECEIVED: msgStatusResId = R.string.dlg_msg_details_msg_status_received; - msgStatusColorResId = R.color.black87; break; case Message.STATUS_SEND: case Message.STATUS_SEND_DISPLAYED: case Message.STATUS_SEND_RECEIVED: default: msgStatusResId = R.string.dlg_msg_details_msg_status_sent; - msgStatusColorResId = R.color.black87; } msgStatusTextView.setText(msgStatusResId); msgStatusTextView.setTextColor(getContext().getResources().getColor(msgStatusColorResId)); diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml index 06716a10..77138a4a 100644 --- a/src/main/res/layout/account_row.xml +++ b/src/main/res/layout/account_row.xml @@ -32,7 +32,7 @@ android:layout_height="wrap_content" android:scrollHorizontally="false" android:singleLine="true" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeHeadline" /> diff --git a/src/main/res/layout/activity_about.xml b/src/main/res/layout/activity_about.xml index faaafcfd..b1b3b562 100644 --- a/src/main/res/layout/activity_about.xml +++ b/src/main/res/layout/activity_about.xml @@ -15,7 +15,7 @@ android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_marginTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" android:typeface="monospace"/> diff --git a/src/main/res/layout/activity_change_password.xml b/src/main/res/layout/activity_change_password.xml index 1a4d00d8..df75e61f 100644 --- a/src/main/res/layout/activity_change_password.xml +++ b/src/main/res/layout/activity_change_password.xml @@ -22,7 +22,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/current_password" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody"/> diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml index 5f6a2dd0..598003e3 100644 --- a/src/main/res/layout/activity_contact_details.xml +++ b/src/main/res/layout/activity_contact_details.xml @@ -39,7 +39,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/account_settings_example_jabber_id" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeHeadline" android:textStyle="bold" /> @@ -61,7 +61,7 @@ android:id="@+id/details_lastseen" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/black54" + android:textColor="@color/secondaryText" android:textSize="?attr/TextSizeBody" /> @@ -78,7 +78,7 @@ android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="@string/send_presence_updates" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -98,7 +98,7 @@ android:layout_below="@+id/details_jidbox" android:layout_marginTop="32dp" android:text="@string/using_account" - android:textColor="@color/black54" + android:textColor="@color/secondaryText" android:textSize="?attr/TextSizeInfo" /> diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml index 98de84f5..9c951afd 100644 --- a/src/main/res/layout/activity_edit_account.xml +++ b/src/main/res/layout/activity_edit_account.xml @@ -42,7 +42,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/account_settings_jabber_id" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -99,8 +99,8 @@ android:hint="@string/confirm_password" android:inputType="textPassword" android:visibility="gone" - android:textColor="@color/black87" - android:textColorHint="@color/black54" + android:textColor="@color/primaryText" + android:textColorHint="@color/secondaryText" android:textSize="?attr/TextSizeBody" /> @@ -132,7 +132,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/server_info_session_established" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -161,7 +161,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/server_info_pep" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -182,7 +182,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/server_info_blocking" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -203,7 +203,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/server_info_stream_management" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -224,7 +224,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/server_info_roster_version" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -245,7 +245,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/server_info_carbon_messages" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -266,7 +266,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/server_info_mam" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -287,7 +287,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/server_info_csi" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> @@ -318,14 +318,14 @@ android:id="@+id/otr_fingerprint" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" android:typeface="monospace" /> @@ -363,7 +363,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/cancel" - android:textColor="@color/black87" /> + android:textColor="@color/primaryText" /> + android:textColor="@color/secondaryText" /> diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index b89c9945..a35e3301 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -26,7 +26,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="16dp" android:text="@string/account_settings_example_jabber_id" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeHeadline" android:textStyle="bold"/> @@ -56,7 +56,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeHeadline"/> @@ -88,7 +88,7 @@ android:layout_height="wrap_content" android:text="@string/private_conference" android:layout_centerVertical="true" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" android:layout_alignParentLeft="true" android:layout_toLeftOf="@+id/change_conference_button" @@ -113,7 +113,7 @@ android:layout_gravity="right" android:layout_marginTop="32dp" android:text="@string/using_account" - android:textColor="@color/black54" + android:textColor="@color/secondaryText" android:textSize="?attr/TextSizeInfo"/> diff --git a/src/main/res/layout/activity_publish_profile_picture.xml b/src/main/res/layout/activity_publish_profile_picture.xml index 4b249745..45f979e3 100644 --- a/src/main/res/layout/activity_publish_profile_picture.xml +++ b/src/main/res/layout/activity_publish_profile_picture.xml @@ -27,7 +27,7 @@ android:layout_below="@id/account_image_wrapper" android:layout_centerHorizontal="true" android:text="@string/touch_to_choose_picture" - android:textColor="@color/black54" /> + android:textColor="@color/secondaryText" /> + android:textColor="@color/secondaryText" /> + android:textColor="@color/primaryText" /> + android:textColor="@color/secondaryText" /> diff --git a/src/main/res/layout/activity_verify_otr.xml b/src/main/res/layout/activity_verify_otr.xml index ab21c693..ce8b831e 100644 --- a/src/main/res/layout/activity_verify_otr.xml +++ b/src/main/res/layout/activity_verify_otr.xml @@ -34,7 +34,7 @@ android:id="@+id/your_fingerprint" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" android:typeface="monospace"/> @@ -42,7 +42,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/your_fingerprint" - android:textColor="@color/black54" + android:textColor="@color/secondaryText" android:textSize="?attr/TextSizeInfo"/> @@ -59,7 +59,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="20dp" android:text="@string/remote_fingerprint" - android:textColor="@color/black54" + android:textColor="@color/secondaryText" android:textSize="?attr/TextSizeInfo"/> @@ -77,7 +77,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="@string/verified" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeHeadline" android:textStyle="bold" android:visibility="gone"/> @@ -87,7 +87,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" android:textStyle="bold" android:visibility="gone"/> @@ -99,8 +99,8 @@ android:layout_marginBottom="8dp" android:hint="@string/shared_secret_hint" android:inputType="textAutoComplete" - android:textColor="@color/black87" - android:textColorHint="@color/black54" + android:textColor="@color/primaryText" + android:textColorHint="@color/secondaryText" android:textSize="?attr/TextSizeBody"/> diff --git a/src/main/res/layout/contact.xml b/src/main/res/layout/contact.xml index 8a8e311b..853387f3 100644 --- a/src/main/res/layout/contact.xml +++ b/src/main/res/layout/contact.xml @@ -34,7 +34,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeHeadline" /> diff --git a/src/main/res/layout/contact_key.xml b/src/main/res/layout/contact_key.xml index 933b72b4..22e4e576 100644 --- a/src/main/res/layout/contact_key.xml +++ b/src/main/res/layout/contact_key.xml @@ -15,7 +15,7 @@ android:id="@+id/key" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" android:typeface="monospace" /> @@ -23,7 +23,7 @@ android:id="@+id/key_type" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/black54" + android:textColor="@color/secondaryText" android:textSize="?attr/TextSizeInfo"/> diff --git a/src/main/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml index e240fa85..4ac7440c 100644 --- a/src/main/res/layout/conversation_list_row.xml +++ b/src/main/res/layout/conversation_list_row.xml @@ -58,7 +58,7 @@ android:layout_alignLeft="@+id/conversation_lastwrapper" android:layout_toLeftOf="@+id/conversation_lastupdate" android:singleLine="true" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeHeadline" android:typeface="sans" /> @@ -76,7 +76,7 @@ android:layout_height="wrap_content" android:scrollHorizontally="false" android:singleLine="true" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" emojicon:emojiconSize="20sp" /> @@ -84,7 +84,7 @@ android:id="@+id/conversation_lastimage" android:layout_width="fill_parent" android:layout_height="36dp" - android:background="@color/black87" + android:background="@color/primaryText" android:scaleType="centerCrop" /> @@ -95,7 +95,7 @@ android:layout_alignBaseline="@+id/conversation_name" android:layout_alignParentRight="true" android:gravity="right" - android:textColor="@color/black54" + android:textColor="@color/secondaryText" android:textSize="?attr/TextSizeInfo" /> diff --git a/src/main/res/layout/create_contact_dialog.xml b/src/main/res/layout/create_contact_dialog.xml index 6333e340..d4fba603 100644 --- a/src/main/res/layout/create_contact_dialog.xml +++ b/src/main/res/layout/create_contact_dialog.xml @@ -10,7 +10,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/your_account" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> + android:textColor="@color/primaryText" + android:textColorHint="@color/secondaryText" /> \ No newline at end of file diff --git a/src/main/res/layout/dialog_message_details.xml b/src/main/res/layout/dialog_message_details.xml index 4d63831e..84159f44 100644 --- a/src/main/res/layout/dialog_message_details.xml +++ b/src/main/res/layout/dialog_message_details.xml @@ -98,7 +98,7 @@ android:layout_alignParentRight="true" android:layout_alignParentEnd="true" android:stretchColumns="1" - android:background="@color/black87" + android:background="@color/primaryText" android:id="@+id/dlgMsgDetFileTable" android:visibility="gone"> diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml index 0a69f508..aab37295 100644 --- a/src/main/res/layout/fragment_conversation.xml +++ b/src/main/res/layout/fragment_conversation.xml @@ -53,7 +53,7 @@ android:paddingLeft="8dp" android:paddingRight="8dp" android:paddingTop="12dp" - android:textColor="@color/black87" > + android:textColor="@color/primaryText" > diff --git a/src/main/res/layout/join_conference_dialog.xml b/src/main/res/layout/join_conference_dialog.xml index 7609dd0d..ef113017 100644 --- a/src/main/res/layout/join_conference_dialog.xml +++ b/src/main/res/layout/join_conference_dialog.xml @@ -10,7 +10,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/your_account" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" /> + android:textColor="@color/primaryText" + android:textColorHint="@color/secondaryText" /> @@ -45,7 +45,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:autoLink="web|phone|email" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" emojicon:emojiconSize="28sp" /> @@ -79,7 +79,7 @@ android:layout_gravity="center_vertical" android:gravity="center_vertical" android:text="@string/sending" - android:textColor="@color/black54" + android:textColor="@color/secondaryText" android:textSize="?attr/TextSizeInfo" /> diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml index 3b8212a5..00368194 100644 --- a/src/main/res/layout/message_sent.xml +++ b/src/main/res/layout/message_sent.xml @@ -36,7 +36,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:adjustViewBounds="true" - android:background="@color/black87" + android:background="@color/primaryText" android:paddingBottom="2dp" android:scaleType="centerCrop" /> @@ -45,7 +45,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:autoLink="web|phone|email" - android:textColor="@color/black87" + android:textColor="@color/primaryText" android:textSize="?attr/TextSizeBody" emojicon:emojiconSize="28sp" /> @@ -70,7 +70,7 @@ android:layout_gravity="center_vertical" android:gravity="center_vertical" android:text="@string/sending" - android:textColor="@color/black54" + android:textColor="@color/secondaryText" android:textSize="?attr/TextSizeInfo" /> diff --git a/src/main/res/layout/quickedit.xml b/src/main/res/layout/quickedit.xml index ff6b0413..74e8dcf8 100644 --- a/src/main/res/layout/quickedit.xml +++ b/src/main/res/layout/quickedit.xml @@ -11,7 +11,7 @@ android:layout_height="wrap_content" android:ems="10" android:inputType="textPersonName" - android:textColor="@color/black87" > + android:textColor="@color/primaryText" > diff --git a/src/main/res/values/colors.xml b/src/main/res/values/colors.xml index 2c3b9f78..9cef1b0a 100644 --- a/src/main/res/values/colors.xml +++ b/src/main/res/values/colors.xml @@ -2,17 +2,24 @@ @color/grey50 @color/grey200 - #ff259b24 - #ff0a7e07 - #ff0091ea - #de000000 - #8a000000 - #1f000000 - #ffffffff - #b2ffffff - #fffafafa - #ffeeeeee - #ff424242 - #fff44336 - #ffff9800 + @color/black87 + @color/black54 + @color/red500 + @color/red500 + @color/green500 + @color/green500 + + #ff259b24 + #ff0a7e07 + #ff0091ea + #de000000 + #8a000000 + #1f000000 + #ffffffff + #b2ffffff + #fffafafa + #ffeeeeee + #ff424242 + #fff44336 + #ffff9800 \ No newline at end of file -- cgit v1.2.3