streamline colors

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2020-10-12 16:14:52 +02:00
parent d7400c3f76
commit 0b7e4c09f4
No known key found for this signature in database
GPG Key ID: 0E00D4D47D0C5AF7
17 changed files with 38 additions and 44 deletions

View File

@ -108,7 +108,7 @@ open class BaseActivity : AppCompatActivity() {
LovelyStandardDialog(this) LovelyStandardDialog(this)
.setTopColorRes(R.color.nc_darkRed) .setTopColorRes(R.color.nc_darkRed)
.setNegativeButtonColorRes(R.color.nc_darkRed) .setNegativeButtonColorRes(R.color.nc_darkRed)
.setPositiveButtonColorRes(R.color.colorPrimaryDark) .setPositiveButtonColorRes(R.color.colorPrimary)
.setIcon(R.drawable.ic_security_white_24dp) .setIcon(R.drawable.ic_security_white_24dp)
.setTitle(R.string.nc_certificate_dialog_title) .setTitle(R.string.nc_certificate_dialog_title)
.setMessage(dialogText) .setMessage(dialogText)

View File

@ -247,11 +247,11 @@ class MagicIncomingTextMessageViewHolder(incomingView: View) : MessageHolders
?: context!!.getText(R.string.nc_nick_guest) ?: context!!.getText(R.string.nc_nick_guest)
quotedMessage?.text = parentChatMessage.text quotedMessage?.text = parentChatMessage.text
quotedUserName?.setTextColor(context!!.resources.getColor(R.color.colorPrimary)) quotedUserName?.setTextColor(context!!.resources.getColor(R.color.textColorMaxContrast))
quotedMessageTime?.text = DateFormatter.format(parentChatMessage.createdAt, DateFormatter.Template.TIME) quotedMessageTime?.text = DateFormatter.format(parentChatMessage.createdAt, DateFormatter.Template.TIME)
quotedMessageTime?.setTextColor(context!!.resources.getColor(R.color.warm_grey_four)) quotedMessageTime?.setTextColor(context!!.resources.getColor(R.color.warm_grey_four))
quoteColoredView?.setBackgroundResource(R.color.colorPrimary) quoteColoredView?.setBackgroundResource(R.color.textColorMaxContrast)
quotedChatMessageView?.visibility = View.VISIBLE quotedChatMessageView?.visibility = View.VISIBLE
} ?: run { } ?: run {
quotedChatMessageView?.visibility = View.GONE quotedChatMessageView?.visibility = View.GONE

View File

@ -133,16 +133,16 @@ class MagicOutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessage
val resources = sharedApplication!!.resources val resources = sharedApplication!!.resources
if (message.isGrouped) { if (message.isGrouped) {
val bubbleDrawable = getMessageSelector( val bubbleDrawable = getMessageSelector(
resources.getColor(R.color.bg_message_list_outcoming_bubble), resources.getColor(R.color.colorPrimary),
resources.getColor(R.color.transparent), resources.getColor(R.color.transparent),
resources.getColor(R.color.bg_message_list_outcoming_bubble), resources.getColor(R.color.colorPrimary),
R.drawable.shape_grouped_outcoming_message) R.drawable.shape_grouped_outcoming_message)
ViewCompat.setBackground(bubble, bubbleDrawable) ViewCompat.setBackground(bubble, bubbleDrawable)
} else { } else {
val bubbleDrawable = getMessageSelector( val bubbleDrawable = getMessageSelector(
resources.getColor(R.color.bg_message_list_outcoming_bubble), resources.getColor(R.color.colorPrimary),
resources.getColor(R.color.transparent), resources.getColor(R.color.transparent),
resources.getColor(R.color.bg_message_list_outcoming_bubble), resources.getColor(R.color.colorPrimary),
R.drawable.shape_outcoming_message) R.drawable.shape_outcoming_message)
ViewCompat.setBackground(bubble, bubbleDrawable) ViewCompat.setBackground(bubble, bubbleDrawable)
} }

View File

@ -26,7 +26,7 @@ import android.graphics.drawable.Drawable;
import android.text.Spannable; import android.text.Spannable;
import android.text.SpannableString; import android.text.SpannableString;
import android.view.View; import android.view.View;
import androidx.core.view.ViewCompat;
import com.nextcloud.talk.R; import com.nextcloud.talk.R;
import com.nextcloud.talk.application.NextcloudTalkApplication; import com.nextcloud.talk.application.NextcloudTalkApplication;
import com.nextcloud.talk.models.json.chat.ChatMessage; import com.nextcloud.talk.models.json.chat.ChatMessage;
@ -35,7 +35,10 @@ import com.nextcloud.talk.utils.preferences.AppPreferences;
import com.stfalcon.chatkit.messages.MessageHolders; import com.stfalcon.chatkit.messages.MessageHolders;
import java.util.Map; import java.util.Map;
import javax.inject.Inject; import javax.inject.Inject;
import androidx.core.view.ViewCompat;
import autodagger.AutoInjector; import autodagger.AutoInjector;
@AutoInjector(NextcloudTalkApplication.class) @AutoInjector(NextcloudTalkApplication.class)
@ -63,7 +66,7 @@ public class MagicSystemMessageViewHolder extends MessageHolders.IncomingTextMes
pressedColor = normalColor; pressedColor = normalColor;
mentionColor = resources.getColor(R.color.nc_author_text); mentionColor = resources.getColor(R.color.textColorMaxContrast);
Drawable bubbleDrawable = DisplayUtils.getMessageSelector(normalColor, Drawable bubbleDrawable = DisplayUtils.getMessageSelector(normalColor,
resources.getColor(R.color.transparent), pressedColor, resources.getColor(R.color.transparent), pressedColor,

View File

@ -22,5 +22,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"> android:shape="oval">
<solid <solid
android:color="@color/colorAccent"/> android:color="@color/colorPrimary"/>
</shape> </shape>

View File

@ -108,8 +108,8 @@
app:outcomingBubblePaddingLeft="@dimen/message_bubble_corners_padding" app:outcomingBubblePaddingLeft="@dimen/message_bubble_corners_padding"
app:outcomingBubblePaddingRight="@dimen/message_bubble_corners_padding" app:outcomingBubblePaddingRight="@dimen/message_bubble_corners_padding"
app:outcomingBubblePaddingTop="@dimen/message_bubble_corners_padding" app:outcomingBubblePaddingTop="@dimen/message_bubble_corners_padding"
app:outcomingDefaultBubbleColor="@color/bg_message_list_outcoming_bubble" app:outcomingDefaultBubbleColor="@color/colorPrimary"
app:outcomingDefaultBubblePressedColor="@color/bg_message_list_outcoming_bubble" app:outcomingDefaultBubblePressedColor="@color/colorPrimary"
app:outcomingDefaultBubbleSelectedColor="@color/transparent" app:outcomingDefaultBubbleSelectedColor="@color/transparent"
app:outcomingImageTimeTextSize="12sp" app:outcomingImageTimeTextSize="12sp"
app:outcomingTextColor="@color/nc_outcoming_text_default" app:outcomingTextColor="@color/nc_outcoming_text_default"

View File

@ -91,6 +91,7 @@
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"
android:backgroundTint="@color/colorPrimary" android:backgroundTint="@color/colorPrimary"
android:layout_margin="16dp" android:layout_margin="16dp"
app:borderWidth="0dp"
app:tint="@color/white" app:tint="@color/white"
app:srcCompat="@drawable/ic_add_white_24px"/> app:srcCompat="@drawable/ic_add_white_24px"/>

View File

@ -65,7 +65,8 @@
android:text="@string/nc_get_from_provider" android:text="@string/nc_get_from_provider"
android:textAlignment="center" android:textAlignment="center"
android:textAllCaps="true" android:textAllCaps="true"
android:textColor="@color/nc_light_blue_color" /> android:alpha="0.5"
android:textColor="@color/textColorOnPrimaryBackground" />
<TextView <TextView
android:id="@+id/cert_text_view" android:id="@+id/cert_text_view"
@ -80,7 +81,8 @@
android:text="@string/nc_configure_cert_auth" android:text="@string/nc_configure_cert_auth"
android:textAlignment="center" android:textAlignment="center"
android:textAllCaps="true" android:textAllCaps="true"
android:textColor="@color/nc_light_blue_color" /> android:alpha="0.5"
android:textColor="@color/textColorOnPrimaryBackground" />
<studio.carbonylgroup.textfieldboxes.TextFieldBoxes <studio.carbonylgroup.textfieldboxes.TextFieldBoxes
android:id="@+id/text_field_boxes" android:id="@+id/text_field_boxes"

View File

@ -54,7 +54,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:textColor="@color/colorPrimary" android:textColor="@color/textColorMaxContrast"
android:textSize="12sp" /> android:textSize="12sp" />
<androidx.emoji.widget.EmojiTextView <androidx.emoji.widget.EmojiTextView

View File

@ -47,7 +47,7 @@
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:textAlignment="center" android:textAlignment="center"
tools:text="System message" tools:text="System message"
android:textColor="@color/colorPrimary" android:textColor="@color/textColorMaxContrast"
android:textSize="14sp" android:textSize="14sp"
app:layout_alignSelf="flex_start" app:layout_alignSelf="flex_start"
app:layout_flexGrow="1" app:layout_flexGrow="1"

View File

@ -83,7 +83,7 @@
android:gravity="top" android:gravity="top"
android:lines="1" android:lines="1"
android:singleLine="true" android:singleLine="true"
android:textColor="@color/conversation_last_message" android:textColor="@color/textColorMaxContrast"
tools:text="This is the last message\nof an incredibly long two line conversation text" /> tools:text="This is the last message\nof an incredibly long two line conversation text" />
<TextView <TextView
@ -110,7 +110,7 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:textColor="@color/conversation_date" /> android:textColor="@color/textColorMaxContrast" />
<androidx.emoji.widget.EmojiTextView <androidx.emoji.widget.EmojiTextView
android:id="@id/dialogName" android:id="@id/dialogName"

View File

@ -58,7 +58,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="middle" android:ellipsize="middle"
android:singleLine="true" android:singleLine="true"
android:textColor="@color/nc_author_text" android:textColor="@color/textColorMaxContrast"
android:textSize="16sp" android:textSize="16sp"
tools:text="Call item text" /> tools:text="Call item text" />

View File

@ -22,22 +22,18 @@
--> -->
<resources> <resources>
<color name="conversation_item_header">#9FBDCC</color> <color name="conversation_item_header">#ffffff</color>
<!--<color name="conversation_item_header">#CFCFCF</color>-->
<color name="bg_default">#222222</color> <color name="bg_default">#222222</color>
<color name="bg_alt">#222222</color> <color name="bg_alt">#222222</color>
<!-- Chat window incoming message text & informational --> <!-- Chat window incoming message text & informational -->
<color name="nc_incoming_text_default">#D8D8D8</color> <color name="nc_incoming_text_default">#D8D8D8</color>
<color name="nc_author_text">#65A7CA</color>
<color name="nc_chip_mention_you_background">#0083C9</color>
<color name="nc_chip_mention_others_background">#6F6F6F</color>
<color name="nc_grey">@android:color/holo_purple</color> <color name="nc_grey">@android:color/holo_purple</color>
<color name="bg_bottom_sheet">#222222</color> <color name="bg_bottom_sheet">#222222</color>
<color name="bg_message_list_incoming_bubble">#484848</color> <color name="bg_message_list_incoming_bubble">#484848</color>
<color name="bg_message_list_outcoming_bubble">#003F62</color>
<color name="textColorMaxContrast">#8c8c8c</color>
<color name="emoji_background">#313031</color> <color name="emoji_background">#313031</color>
<color name="emoji_divider">#15FFFFFF</color> <color name="emoji_divider">#15FFFFFF</color>

View File

@ -21,8 +21,7 @@
<resources> <resources>
<color name="colorPrimary">#0082C9</color> <color name="colorPrimary">#0082C9</color>
<color name="colorPrimaryDark">#006AA3</color> <color name="textColorOnPrimaryBackground">#ffffff</color> <!-- white/black depending on primary color -->
<color name="colorAccent">#007CC2</color>
<!-- Text color of sent messages --> <!-- Text color of sent messages -->
<color name="nc_outcoming_text_default">#FFFFFF</color> <color name="nc_outcoming_text_default">#FFFFFF</color>
@ -30,9 +29,7 @@
<color name="nc_incoming_text_default">#37505D</color> <color name="nc_incoming_text_default">#37505D</color>
<!-- Name of person or group for the chat conversation --> <!-- Name of person or group for the chat conversation -->
<color name="conversation_item_header">#37505D</color> <color name="conversation_item_header">#000000</color>
<color name="conversation_date">@color/warm_grey_two</color>
<color name="conversation_last_message">@color/warm_grey_four</color>
<color name="conversation_unread_bubble">#FFFFFF</color> <color name="conversation_unread_bubble">#FFFFFF</color>
<color name="nc_incoming_text_mention_you">#C98879</color> <color name="nc_incoming_text_mention_you">#C98879</color>
@ -41,12 +38,12 @@
<color name="nc_darkRed">#D32F2F</color> <color name="nc_darkRed">#D32F2F</color>
<color name="nc_darkGreen">#006400</color> <color name="nc_darkGreen">#006400</color>
<color name="nc_white_color">@color/per70white</color> <color name="nc_white_color">@color/per70white</color>
<color name="nc_light_blue_color">#7FC0E3</color>
<color name="controller_chat_separator">#E8E8E8</color> <color name="controller_chat_separator">#E8E8E8</color>
<color name="grey_600">#757575</color> <color name="grey_600">#757575</color>
<color name="nc_grey">#D5D5D5</color> <color name="nc_grey">#D5D5D5</color>
<color name="controller_call_incomingCallTextView">#E9FFFFFF</color> <color name="controller_call_incomingCallTextView">#E9FFFFFF</color>
<color name="grey950">#111111</color> <color name="grey950">#111111</color>
<color name="textColorMaxContrast">#767676</color>
<color name="whiteHalfTransparent">#7Fffffff</color> <color name="whiteHalfTransparent">#7Fffffff</color>
<!-- Emoji list in chat window --> <!-- Emoji list in chat window -->
@ -59,14 +56,9 @@
<color name="bg_default">#FFFFFF</color> <color name="bg_default">#FFFFFF</color>
<color name="bg_alt">@color/white60</color> <color name="bg_alt">@color/white60</color>
<color name="nc_chip_mention_you_background">#0083C9</color>
<color name="nc_chip_mention_others_background">@color/white</color>
<color name="bg_dark_mention_chips">#333333</color> <color name="bg_dark_mention_chips">#333333</color>
<color name="bg_message_list_incoming_bubble">#EFEFEF</color> <color name="bg_message_list_incoming_bubble">#EFEFEF</color>
<color name="bg_message_list_outcoming_bubble">@color/colorPrimary</color>
<color name="nc_author_text">#65A7CA</color>
<color name="bg_bottom_sheet">#46ffffff</color> <color name="bg_bottom_sheet">#46ffffff</color>
</resources> </resources>

View File

@ -24,7 +24,7 @@
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge"> <style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorPrimary</item> <item name="colorAccent">@color/colorPrimary</item>
<item name="android:panelFullBackground">@color/colorPrimary</item> <item name="android:panelFullBackground">@color/colorPrimary</item>
<item name="android:itemBackground">@color/nc_outcoming_text_default</item> <item name="android:itemBackground">@color/nc_outcoming_text_default</item>
@ -48,11 +48,11 @@
</style> </style>
<style name="ChipOutgoingTextAppearance" parent="TextAppearance.MaterialComponents.Chip"> <style name="ChipOutgoingTextAppearance" parent="TextAppearance.MaterialComponents.Chip">
<item name="android:textColor">@color/nc_incoming_text_default</item> <item name="android:textColor">@color/textColorOnPrimaryBackground</item>
</style> </style>
<style name="ChipMentionTextAppearance" parent="TextAppearance.MaterialComponents.Chip"> <style name="ChipMentionTextAppearance" parent="TextAppearance.MaterialComponents.Chip">
<item name="android:textColor">@color/colorAccent</item> <item name="android:textColor">@color/colorPrimary</item>
</style> </style>
<style name="appActionBarStyle" parent="@style/Widget.MaterialComponents.ActionBar.Solid"> <style name="appActionBarStyle" parent="@style/Widget.MaterialComponents.ActionBar.Solid">

View File

@ -22,5 +22,5 @@
<chip xmlns:android="http://schemas.android.com/apk/res/android" <chip xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:textAppearance="@style/ChipIncomingTextAppearance" android:textAppearance="@style/ChipIncomingTextAppearance"
app:chipBackgroundColor="@color/nc_chip_mention_others_background" app:chipBackgroundColor="@color/white"
app:closeIconEnabled="false" /> app:closeIconEnabled="false" />

View File

@ -22,5 +22,5 @@
<chip xmlns:android="http://schemas.android.com/apk/res/android" <chip xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:textAppearance="@style/ChipOutgoingTextAppearance" android:textAppearance="@style/ChipOutgoingTextAppearance"
app:chipBackgroundColor="@color/nc_chip_mention_you_background" app:chipBackgroundColor="@color/colorPrimary"
app:closeIconEnabled="false"/> app:closeIconEnabled="false"/>