mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-13 15:54:59 +01:00
Update chips colors
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
017ee9e034
commit
c52d08410d
@ -162,7 +162,7 @@ public class MagicIncomingTextMessageViewHolder
|
|||||||
individualHashMap.get("name"),
|
individualHashMap.get("name"),
|
||||||
individualHashMap.get("type"),
|
individualHashMap.get("type"),
|
||||||
userUtils.getUserById(message.getActiveUserId()),
|
userUtils.getUserById(message.getActiveUserId()),
|
||||||
R.xml.chip_simple_background);
|
R.xml.chip_incoming_others);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (individualHashMap.get("type").equals("file")) {
|
} else if (individualHashMap.get("type").equals("file")) {
|
||||||
|
@ -100,7 +100,7 @@ public class MagicOutcomingTextMessageViewHolder extends MessageHolders.Outcomin
|
|||||||
individualHashMap.get("name"),
|
individualHashMap.get("name"),
|
||||||
individualHashMap.get("type"),
|
individualHashMap.get("type"),
|
||||||
userUtils.getUserById(message.getActiveUserId()),
|
userUtils.getUserById(message.getActiveUserId()),
|
||||||
R.xml.chip_simple_background);
|
R.xml.chip_outgoing_others);
|
||||||
} else {
|
} else {
|
||||||
messageString =
|
messageString =
|
||||||
DisplayUtils.searchAndReplaceWithMentionSpan(messageText.getContext(),
|
DisplayUtils.searchAndReplaceWithMentionSpan(messageText.getContext(),
|
||||||
|
@ -56,7 +56,7 @@ public class MentionAutocompleteCallback implements AutocompleteCallback<Mention
|
|||||||
Spans.MentionChipSpan mentionChipSpan =
|
Spans.MentionChipSpan mentionChipSpan =
|
||||||
new Spans.MentionChipSpan(DisplayUtils.getDrawableForMentionChipSpan(context,
|
new Spans.MentionChipSpan(DisplayUtils.getDrawableForMentionChipSpan(context,
|
||||||
item.getId(), item.getLabel(), conversationUser, item.getSource(),
|
item.getId(), item.getLabel(), conversationUser, item.getSource(),
|
||||||
R.xml.chip_accent_background, emojiEditText),
|
R.xml.chip_text_entry, emojiEditText),
|
||||||
DynamicDrawableSpan.ALIGN_BASELINE,
|
DynamicDrawableSpan.ALIGN_BASELINE,
|
||||||
item.getId(), item.getLabel());
|
item.getId(), item.getLabel());
|
||||||
editable.setSpan(mentionChipSpan, start, start + item.getLabel().length(),
|
editable.setSpan(mentionChipSpan, start, start + item.getLabel().length(),
|
||||||
|
@ -237,7 +237,7 @@ public class DisplayUtils {
|
|||||||
boolean isCall = "call".equals(type) || "calls".equals(type);
|
boolean isCall = "call".equals(type) || "calls".equals(type);
|
||||||
|
|
||||||
if (!isCall) {
|
if (!isCall) {
|
||||||
if (chipResource == R.xml.chip_accent_background) {
|
if (chipResource == R.xml.chip_outgoing_others || chipResource == R.xml.chip_accent_background) {
|
||||||
drawable = R.drawable.white_circle;
|
drawable = R.drawable.white_circle;
|
||||||
} else {
|
} else {
|
||||||
drawable = R.drawable.accent_circle;
|
drawable = R.drawable.accent_circle;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<resources>
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
|
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||||
@ -16,11 +16,15 @@
|
|||||||
<item name="android:textSize">12sp</item>
|
<item name="android:textSize">12sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="ChipTextAppearance" parent="TextAppearance.MaterialComponents.Chip">
|
<style name="ChipIncomingTextAppearance" parent="TextAppearance.MaterialComponents.Chip">
|
||||||
<item name="android:textColor">@android:color/white</item>
|
<item name="android:textColor">@color/nc_incoming_text_default</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="ChipAccentTextAppearance" parent="TextAppearance.MaterialComponents.Chip">
|
<style name="ChipOutgoingTextAppearance" parent="TextAppearance.MaterialComponents.Chip">
|
||||||
|
<item name="android:textColor">@color/nc_outcoming_text_default</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="ChipMentionTextAppearance" parent="TextAppearance.MaterialComponents.Chip">
|
||||||
<item name="android:textColor">@color/colorAccent</item>
|
<item name="android:textColor">@color/colorAccent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -21,6 +21,6 @@
|
|||||||
|
|
||||||
<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/ChipTextAppearance"
|
android:textAppearance="@style/ChipOutgoingTextAppearance"
|
||||||
app:chipBackgroundColor="@color/colorAccent"
|
app:chipBackgroundColor="@color/colorAccent"
|
||||||
app:closeIconEnabled="false"/>
|
app:closeIconEnabled="false"/>
|
||||||
|
28
app/src/main/res/xml/chip_incoming_others.xml
Normal file
28
app/src/main/res/xml/chip_incoming_others.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Nextcloud Talk application
|
||||||
|
~
|
||||||
|
~ @author Mario Danic
|
||||||
|
~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
~
|
||||||
|
~ This program is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation, either version 3 of the License, or
|
||||||
|
~ at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This program is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License
|
||||||
|
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<chip xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:textAppearance="@style/ChipIncomingTextAppearance"
|
||||||
|
app:chipStrokeColor="@color/colorAccent"
|
||||||
|
app:chipBackgroundColor="@color/transparent"
|
||||||
|
app:chipStrokeWidth="1dp"
|
||||||
|
app:closeIconEnabled="false" />
|
28
app/src/main/res/xml/chip_outgoing_others.xml
Normal file
28
app/src/main/res/xml/chip_outgoing_others.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Nextcloud Talk application
|
||||||
|
~
|
||||||
|
~ @author Mario Danic
|
||||||
|
~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
~
|
||||||
|
~ This program is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation, either version 3 of the License, or
|
||||||
|
~ at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This program is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License
|
||||||
|
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<chip xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:textAppearance="@style/ChipOutgoingTextAppearance"
|
||||||
|
app:chipStrokeColor="@color/white"
|
||||||
|
app:chipBackgroundColor="@color/transparent"
|
||||||
|
app:chipStrokeWidth="1dp"
|
||||||
|
app:closeIconEnabled="false" />
|
@ -21,6 +21,6 @@
|
|||||||
|
|
||||||
<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/ChipAccentTextAppearance"
|
android:textAppearance="@style/ChipMentionTextAppearance"
|
||||||
app:chipBackgroundColor="@color/white_four"
|
app:chipBackgroundColor="@color/white"
|
||||||
app:closeIconEnabled="false" />
|
app:closeIconEnabled="false" />
|
||||||
|
@ -22,5 +22,7 @@
|
|||||||
<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/ChipAccentTextAppearance"
|
android:textAppearance="@style/ChipAccentTextAppearance"
|
||||||
app:chipBackgroundColor="@color/white"
|
app:chipStrokeColor="@color/grey_600"
|
||||||
|
app:chipStrokeWidth="1dp"
|
||||||
|
app:chipBackgroundColor="@color/transparent"
|
||||||
app:closeIconEnabled="false" />
|
app:closeIconEnabled="false" />
|
Loading…
Reference in New Issue
Block a user