mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 06:15:12 +00:00
optimize grey tones regarding WCAG guidelines and material design standard colors
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
c3b28a35c7
commit
690d09eb60
@ -42,6 +42,8 @@ import java.util.regex.Pattern;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.emoji.widget.EmojiTextView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
@ -121,16 +123,18 @@ public class UserItem extends AbstractFlexibleItem<UserItem.UserItemViewHolder>
|
||||
}
|
||||
|
||||
if (!isOnline) {
|
||||
if (holder.contactMentionId != null) {
|
||||
holder.contactMentionId.setAlpha(0.38f);
|
||||
}
|
||||
holder.contactDisplayName.setAlpha(0.38f);
|
||||
holder.contactDisplayName.setTextColor(ResourcesCompat.getColor(
|
||||
holder.contactDisplayName.getContext().getResources(),
|
||||
R.color.medium_emphasis_text,
|
||||
null)
|
||||
);
|
||||
holder.simpleDraweeView.setAlpha(0.38f);
|
||||
} else {
|
||||
if (holder.contactMentionId != null) {
|
||||
holder.contactMentionId.setAlpha(1.0f);
|
||||
}
|
||||
holder.contactDisplayName.setAlpha(1.0f);
|
||||
holder.contactDisplayName.setTextColor(ResourcesCompat.getColor(
|
||||
holder.contactDisplayName.getContext().getResources(),
|
||||
R.color.high_emphasis_text,
|
||||
null)
|
||||
);
|
||||
holder.simpleDraweeView.setAlpha(1.0f);
|
||||
}
|
||||
|
||||
@ -243,7 +247,6 @@ public class UserItem extends AbstractFlexibleItem<UserItem.UserItemViewHolder>
|
||||
|
||||
if (!holder.contactMentionId.getText().equals(userType)) {
|
||||
holder.contactMentionId.setText(userType);
|
||||
holder.contactMentionId.setTextColor(NextcloudTalkApplication.Companion.getSharedApplication().getResources().getColor(R.color.textColorMaxContrast));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/rv_item_contact" />
|
||||
tools:listitem="@layout/rv_item_conversation_info_participant" />
|
||||
|
||||
</com.yarolegovich.mp.MaterialPreferenceCategory>
|
||||
|
||||
|
@ -37,7 +37,8 @@
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:transitionName="userAvatar.transitionTag"
|
||||
app:roundAsCircle="true" />
|
||||
app:roundAsCircle="true"
|
||||
tools:src="@tools:sample/avatars[0]" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
android:id="@+id/userinfo_fullName"
|
||||
@ -47,7 +48,6 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/margin_between_elements"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/nc_incoming_text_default"
|
||||
tools:text="John Doe" />
|
||||
|
||||
<TextView
|
||||
@ -59,7 +59,6 @@
|
||||
android:layout_margin="4dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="2"
|
||||
android:textColor="@color/nc_incoming_text_default"
|
||||
tools:text="john@nextcloud.com" />
|
||||
|
||||
<LinearLayout
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
<com.yarolegovich.mp.MaterialPreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:apc="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/settings_screen"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
@ -60,7 +61,7 @@
|
||||
android:layout_below="@id/avatar_image"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/margin_between_elements"
|
||||
android:textColor="@color/nc_incoming_text_default" />
|
||||
tools:text="Jane Doe" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/base_url_text"
|
||||
@ -69,7 +70,7 @@
|
||||
android:layout_below="@id/display_name_text"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="4dp"
|
||||
android:textColor="@color/nc_incoming_text_default" />
|
||||
tools:text="jane@nextcloud.com"/>
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/avatar_image"
|
||||
@ -77,7 +78,8 @@
|
||||
android:layout_height="@dimen/avatar_size_big"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:transitionName="userAvatar.transitionTag"
|
||||
apc:roundAsCircle="true" />
|
||||
apc:roundAsCircle="true"
|
||||
tools:src="@tools:sample/avatars[0]" />
|
||||
|
||||
|
||||
<com.yarolegovich.mp.MaterialStandardPreference
|
||||
|
@ -73,7 +73,8 @@
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
tools:text="Call item text" />
|
||||
android:textColor="@color/conversation_item_header"
|
||||
tools:text="Jane Doe" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
android:id="@+id/secondary_text"
|
||||
@ -81,8 +82,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/textColorMaxContrast"
|
||||
tools:text="A week ago" />
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="Moderator" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -58,8 +58,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/textColorMaxContrast"
|
||||
android:textSize="16sp"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
tools:text="Call item text" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
@ -68,8 +67,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/nc_incoming_text_default"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/textColorMaxContrast"
|
||||
tools:text="A week ago" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -32,7 +32,10 @@
|
||||
<color name="appbar">#1E1E1E</color>
|
||||
<color name="fontAppbar">#FFFFFF</color>
|
||||
|
||||
<color name="conversation_item_header">#deffffff</color>
|
||||
<!-- general text colors -->
|
||||
<color name="high_emphasis_text">#deffffff</color>
|
||||
<color name="medium_emphasis_text">#99ffffff</color>
|
||||
<color name="low_emphasis_text">#61ffffff</color>
|
||||
|
||||
<color name="bg_default">#121212</color>
|
||||
<color name="bg_inverse">@color/grey950</color>
|
||||
|
@ -33,13 +33,18 @@
|
||||
<color name="fontAppbar">#666666</color>
|
||||
<color name="fontSecondaryAppbar">#A5A5A5</color>
|
||||
|
||||
<!-- general text colors -->
|
||||
<color name="high_emphasis_text">#de000000</color>
|
||||
<color name="medium_emphasis_text">#99000000</color>
|
||||
<color name="low_emphasis_text">#61000000</color>
|
||||
|
||||
<!-- Text color of sent messages -->
|
||||
<color name="nc_outcoming_text_default">#FFFFFF</color>
|
||||
<!-- Text color of received messages -->
|
||||
<color name="nc_incoming_text_default">#37505D</color>
|
||||
|
||||
<!-- Name of person or group for the chat conversation -->
|
||||
<color name="conversation_item_header">#000000</color>
|
||||
<color name="conversation_item_header">@color/high_emphasis_text</color>
|
||||
<color name="conversation_unread_bubble">#DBDBDB</color>
|
||||
<color name="conversation_unread_bubble_text">#222222</color>
|
||||
|
||||
|
@ -31,6 +31,9 @@
|
||||
<item name="android:panelFullBackground">@color/colorPrimary</item>
|
||||
<item name="android:itemBackground">@color/nc_outcoming_text_default</item>
|
||||
<item name="android:textColor">@color/conversation_item_header</item>
|
||||
<item name="android:textColorPrimary">@color/high_emphasis_text</item>
|
||||
<item name="android:textColorSecondary">@color/medium_emphasis_text</item>
|
||||
<item name="android:textColorTertiary">@color/low_emphasis_text</item>
|
||||
<item name="android:popupMenuStyle">@style/appActionBarPopupMenu</item>
|
||||
<item name="actionOverflowMenuStyle">@style/appActionBarPopupMenu</item>
|
||||
<item name="actionBarPopupTheme">@style/appActionBarPopupMenu</item>
|
||||
@ -44,7 +47,7 @@
|
||||
</style>
|
||||
|
||||
<style name="ListItem" parent="BottomSheet.ListItem.TextAppearance">
|
||||
<item name="android:textColor">@color/conversation_item_header</item>
|
||||
<item name="android:textColor">@color/high_emphasis_text</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
@ -65,7 +68,7 @@
|
||||
<item name="android:colorPrimary">@color/fg_inverse</item>
|
||||
<item name="android:textColorSecondary">@color/fontAppbar</item>
|
||||
<item name="android:background">@color/appbar</item>
|
||||
<item name="android:textColor">@color/conversation_item_header</item>
|
||||
<item name="android:textColor">@color/high_emphasis_text</item>
|
||||
<item name="iconTint">@color/fontAppbar</item>
|
||||
</style>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user