diff --git a/app/src/main/java/app/fedilab/android/BaseMainActivity.java b/app/src/main/java/app/fedilab/android/BaseMainActivity.java index 06f7cbe31..afe0714ba 100644 --- a/app/src/main/java/app/fedilab/android/BaseMainActivity.java +++ b/app/src/main/java/app/fedilab/android/BaseMainActivity.java @@ -1219,7 +1219,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt } if (!isFinishing()) { headerMainBinding.accountName.setText( - currentAccount.mastodon_account.getSpanDisplayName(BaseMainActivity.this, + currentAccount.mastodon_account.getSpanDisplayNameEmoji(BaseMainActivity.this, new WeakReference<>(headerMainBinding.accountName)), TextView.BufferType.SPANNABLE); } diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/DirectMessageActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/DirectMessageActivity.java index 92bad7d67..7d63ccb72 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/DirectMessageActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/DirectMessageActivity.java @@ -53,7 +53,6 @@ public class DirectMessageActivity extends BaseActivity implements FragmentMasto public static boolean displayCW; FragmentMastodonDirectMessage currentFragment; - private Status firstMessage; private String remote_instance; @Override @@ -149,7 +148,6 @@ public class DirectMessageActivity extends BaseActivity implements FragmentMasto @Override public void get(Status status) { - firstMessage = status; invalidateOptionsMenu(); } } \ No newline at end of file diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java index c5313a297..9476dca8e 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/MediaActivity.java @@ -154,7 +154,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload binding.mediaDescription.setMovementMethod(new ScrollingMovementMethod()); binding.mediaDescriptionTranslated.setMovementMethod(new ScrollingMovementMethod()); - + if (description != null && description.trim().length() > 0 && description.trim().compareTo("null") != 0) { binding.mediaDescription.setText(description); binding.translate.setOnClickListener(v -> { diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java index ef0e4fc07..0c1648248 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java @@ -456,7 +456,7 @@ public class ProfileActivity extends BaseActivity { } binding.accountDn.setText( - account.getSpanDisplayName(ProfileActivity.this, + account.getSpanDisplayNameEmoji(ProfileActivity.this, new WeakReference<>(binding.accountDn)), TextView.BufferType.SPANNABLE); diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminAccountActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminAccountActivity.java index 04074ea42..f78e0af61 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminAccountActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminAccountActivity.java @@ -310,7 +310,7 @@ public class AdminAccountActivity extends BaseActivity { binding.accountDn.setText( - adminAccount.account.getSpanDisplayName(AdminAccountActivity.this, + adminAccount.account.getSpanDisplayNameEmoji(AdminAccountActivity.this, new WeakReference<>(binding.accountDn)), TextView.BufferType.SPANNABLE); binding.accountUn.setText(String.format("@%s", adminAccount.account.acct)); diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminReportActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminReportActivity.java index f5d79bb82..1ff4effea 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminReportActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/admin/AdminReportActivity.java @@ -328,7 +328,7 @@ public class AdminReportActivity extends BaseBarActivity { } binding.accountDn.setText( - account.getSpanDisplayName(AdminReportActivity.this, + account.getSpanDisplayNameEmoji(AdminReportActivity.this, new WeakReference<>(binding.accountDn)), TextView.BufferType.SPANNABLE); binding.accountUn.setText(String.format("@%s", account.acct)); diff --git a/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Account.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Account.java index a29c37496..5fc2e8d76 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Account.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Account.java @@ -89,14 +89,15 @@ public class Account implements Serializable { public Role role; public transient RelationShip relationShip; + public synchronized Spannable getSpanDisplayName(Context context, WeakReference viewWeakReference) { if (display_name == null || display_name.isEmpty()) { display_name = username; } - return SpannableHelper.convert(context, display_name, null, this, null, viewWeakReference); + return SpannableHelper.convert(context, display_name, null, this, null, viewWeakReference, null, true, false); } - public synchronized Spannable getSpanDisplayName(Activity activity, WeakReference viewWeakReference) { + public synchronized Spannable getSpanDisplayNameEmoji(Activity activity, WeakReference viewWeakReference) { if (display_name == null || display_name.isEmpty()) { display_name = username; } @@ -104,11 +105,11 @@ public class Account implements Serializable { } public synchronized Spannable getSpanDisplayNameTitle(Context context, WeakReference viewWeakReference, String title) { - return SpannableHelper.convert(context, title, null, this, null, viewWeakReference); + return SpannableHelper.convert(context, title, null, this, null, viewWeakReference, null, true, false); } public synchronized Spannable getSpanNote(Context context, WeakReference viewWeakReference) { - return SpannableHelper.convert(context, note, null, this, null, viewWeakReference); + return SpannableHelper.convert(context, note, null, this, null, viewWeakReference, null, true, false); } @Override diff --git a/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Announcement.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Announcement.java index 682eeb8b4..b429bb7df 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Announcement.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Announcement.java @@ -56,7 +56,7 @@ public class Announcement { public synchronized Spannable getSpanContent(Context context, WeakReference viewWeakReference) { - return SpannableHelper.convert(context, content, null, null, this, viewWeakReference); + return SpannableHelper.convert(context, content, null, null, this, viewWeakReference, null, true, false); } } diff --git a/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Field.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Field.java index 6c24c0ea4..9b8551ff9 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Field.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Field.java @@ -47,7 +47,7 @@ public class Field implements Serializable { if (verified_at != null && value != null) { value_span = new ForegroundColorSpan(ContextCompat.getColor(context, R.color.verified_text)); } - Spannable spannable = SpannableHelper.convert(context, value, null, account, null, viewWeakReference); + Spannable spannable = SpannableHelper.convert(context, value, null, account, null, viewWeakReference, null, true, false); if (value_span != null && spannable != null) { spannable.setSpan(value_span, 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); } @@ -57,7 +57,7 @@ public class Field implements Serializable { public synchronized Spannable getLabelSpan(Context context, Account account, WeakReference viewWeakReference) { - Spannable spannable = SpannableHelper.convert(context, name, null, account, null, viewWeakReference); + Spannable spannable = SpannableHelper.convert(context, name, null, account, null, viewWeakReference, null, true, false); if (name_span != null && spannable != null) { spannable.setSpan(name_span, 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); } diff --git a/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Status.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Status.java index 062ee42c2..70874d13d 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Status.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/api/Status.java @@ -133,6 +133,8 @@ public class Status implements Serializable, Cloneable { public transient boolean setCursorToEnd = false; public transient int cursorPosition = 0; public transient boolean submitted = false; + + public transient boolean underlined = false; public boolean spoilerChecked = false; public Filter filteredByApp; public transient Spannable contentSpan; @@ -152,21 +154,21 @@ public class Status implements Serializable, Cloneable { public synchronized Spannable getSpanContent(Context context, WeakReference viewWeakReference, Callback callback) { if (contentSpan == null) { - contentSpan = SpannableHelper.convert(context, content, this, null, null, viewWeakReference, callback, true); + contentSpan = SpannableHelper.convert(context, content, this, null, null, viewWeakReference, callback, true, true); } return contentSpan; } public synchronized Spannable getSpanSpoiler(Context context, WeakReference viewWeakReference, Callback callback) { if (contentSpoilerSpan == null) { - contentSpoilerSpan = SpannableHelper.convert(context, spoiler_text, this, null, null, viewWeakReference, callback, false); + contentSpoilerSpan = SpannableHelper.convert(context, spoiler_text, this, null, null, viewWeakReference, callback, true, false); } return contentSpoilerSpan; } public synchronized Spannable getSpanTranslate(Context context, WeakReference viewWeakReference, Callback callback) { if (contentTranslateSpan == null) { - contentTranslateSpan = SpannableHelper.convert(context, translationContent, this, null, null, viewWeakReference, callback, true); + contentTranslateSpan = SpannableHelper.convert(context, translationContent, this, null, null, viewWeakReference, callback, true, true); } return contentTranslateSpan; } diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java index 04a07d1eb..c76ca7e25 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java @@ -2044,6 +2044,31 @@ public class Helper { } } + public static boolean isNumeric(String str) { + try { + Double.parseDouble(str); + return true; + } catch (NumberFormatException e) { + return false; + } + } + + public static OkHttpClient myOkHttpClient(Context context) { + return new OkHttpClient.Builder() + .addInterceptor(chain -> { + Request originalRequest = chain.request(); + Request requestWithUserAgent = originalRequest.newBuilder() + .header("User-Agent", context.getString(R.string.app_name) + "/" + BuildConfig.VERSION_NAME + "/" + BuildConfig.VERSION_CODE) + .build(); + return chain.proceed(requestWithUserAgent); + }) + .readTimeout(60, TimeUnit.SECONDS) + .connectTimeout(60, TimeUnit.SECONDS) + .callTimeout(60, TimeUnit.SECONDS) + .proxy(Helper.getProxy(context)) + .build(); + } + //Enum that described actions to replace inside a toot content public enum PatternType { MENTION, @@ -2074,29 +2099,4 @@ public class Helper { public interface OnFileCopied { void onFileCopied(File file); } - - public static boolean isNumeric(String str) { - try { - Double.parseDouble(str); - return true; - } catch (NumberFormatException e) { - return false; - } - } - - public static OkHttpClient myOkHttpClient(Context context) { - return new OkHttpClient.Builder() - .addInterceptor(chain -> { - Request originalRequest = chain.request(); - Request requestWithUserAgent = originalRequest.newBuilder() - .header("User-Agent", context.getString(R.string.app_name) + "/" + BuildConfig.VERSION_NAME + "/" + BuildConfig.VERSION_CODE) - .build(); - return chain.proceed(requestWithUserAgent); - }) - .readTimeout(60, TimeUnit.SECONDS) - .connectTimeout(60, TimeUnit.SECONDS) - .callTimeout(60, TimeUnit.SECONDS) - .proxy(Helper.getProxy(context)) - .build(); - } } diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java index 960dc3aef..d5bf4ecc4 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java @@ -63,9 +63,8 @@ import retrofit2.converter.gson.GsonConverterFactory; public class NotificationsHelper { - public static HashMap> pushed_notifications = new HashMap<>(); - private static final HashMap lockMap = new HashMap<>(); + public static HashMap> pushed_notifications = new HashMap<>(); private static ReentrantLock getLock(String slug) { synchronized (lockMap) { diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/SpannableHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/SpannableHelper.java index d6c4ee815..6f65eaa69 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/SpannableHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/SpannableHelper.java @@ -43,7 +43,6 @@ import android.view.View; import android.webkit.URLUtil; import android.widget.Toast; -import androidx.annotation.ColorInt; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.core.content.ContextCompat; @@ -106,33 +105,6 @@ public class SpannableHelper { public static final String CLICKABLE_SPAN = "CLICKABLE_SPAN"; private static int linkColor; - public static Spannable convert(Context context, String text, - Status status, Account account, Announcement announcement, WeakReference viewWeakReference) { - return convert(context, text, status, account, announcement, viewWeakReference, null, true, false); - } - - public static Spannable convert(Context context, String text, - Status status, Account account, Announcement announcement, - WeakReference viewWeakReference, Status.Callback callback, boolean convertMarkdown) { - return convert(context, text, status, account, announcement, viewWeakReference, callback, true, convertMarkdown); - } - - - public static boolean isRTL(String s) { - for (int i = 0; i < s.length(); i++) { - byte d = Character.getDirectionality(s.charAt(i)); - if (d == Character.DIRECTIONALITY_RIGHT_TO_LEFT || - d == Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC || - d == Character.DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING || - d == Character.DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE - ) { - return true; - } - } - - return false; - } - public static Spannable convert(Context context, String text, Status status, Account account, Announcement announcement, WeakReference viewWeakReference, Status.Callback callback, boolean convertHtml, boolean convertMarkdown) { @@ -160,6 +132,10 @@ public class SpannableHelper { if (linkColor == 0) { linkColor = -1; } + if (status != null && status.underlined) { + linkColor = -1; + } + List mentions = new ArrayList<>(); if (status != null && status.mentions != null) { mentions.addAll(status.mentions); @@ -333,7 +309,7 @@ public class SpannableHelper { @Override public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); - ds.setUnderlineText(false); + ds.setUnderlineText(status != null && status.underlined); if (linkColor != -1) { ds.setColor(linkColor); } @@ -341,10 +317,10 @@ public class SpannableHelper { }, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } else { - makeLinks(context, content, url, start, end); + makeLinks(context, status, content, url, start, end); } replaceQuoteSpans(context, content); - emails(context, content); + emails(context, content, status); } Pattern imgPattern = Pattern.compile("]*src=\"([^\"]+)\"[^>]*>"); @@ -390,25 +366,8 @@ public class SpannableHelper { return trimSpannable(new SpannableStringBuilder(content)); } - public interface Prism4jTheme { - @ColorInt - int background(); - - @ColorInt - int textColor(); - - void apply( - @NonNull String language, - @NonNull Prism4j.Syntax syntax, - @NonNull SpannableStringBuilder builder, - int start, - int end - ); - } - - - private static void makeLinks(Context context, SpannableStringBuilder content, String url, int start, int end) { + private static void makeLinks(Context context, Status status, SpannableStringBuilder content, String url, int start, int end) { String newUrl = url; boolean validUrl = URLUtil.isValidUrl(url) && url.length() == (end - start); if (validUrl) { @@ -640,7 +599,7 @@ public class SpannableHelper { @Override public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); - ds.setUnderlineText(false); + ds.setUnderlineText(status != null && status.underlined); if (linkColor != -1) { ds.setColor(linkColor); } @@ -756,7 +715,7 @@ public class SpannableHelper { } } - private static void emails(Context context, Spannable content) { + private static void emails(Context context, Spannable content, Status status) { // --- For all patterns defined in Helper class --- Pattern pattern = Helper.emailPattern; Matcher matcher = pattern.matcher(content); @@ -785,7 +744,7 @@ public class SpannableHelper { @Override public void updateDrawState(@NonNull TextPaint ds) { super.updateDrawState(ds); - ds.setUnderlineText(false); + ds.setUnderlineText(status != null && status.underlined); if (linkColor != -1) { ds.setColor(linkColor); } diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java index 9117e71c5..f176f4498 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java @@ -159,14 +159,13 @@ public class ComposeAdapter extends RecyclerView.Adapter emojisList = new ArrayList<>(); private boolean unlisted_changed = false; - private RecyclerView mRecyclerView; - public MediaDescriptionCallBack mediaDescriptionCallBack; public ComposeAdapter(List statusList, int statusCount, BaseAccount account, Account mentionedAccount, String visibility, String editMessageId) { @@ -1251,10 +1250,6 @@ public class ComposeAdapter extends RecyclerView.Adapter(holder.binding.messageContent), @@ -279,17 +280,19 @@ public class StatusDirectMessageAdapter extends RecyclerView.Adapter(pollItemBinding.pollItemText)), TextView.BufferType.SPANNABLE); - pollItemBinding.pollItemPercent.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnSecondary)); - pollItemBinding.pollItemText.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnSecondary)); + if (status.account.id.equals(MainActivity.currentUserID)) { + pollItemBinding.pollItemPercent.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnPrimary)); + pollItemBinding.pollItemText.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnPrimary)); + } else { + pollItemBinding.pollItemPercent.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnSecondary)); + pollItemBinding.pollItemText.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnSecondary)); + } pollItemBinding.pollItemValue.setProgress((int) value); if (pollItem.votes_count == greaterValue) { pollItemBinding.pollItemPercent.setTypeface(null, Typeface.BOLD); @@ -395,7 +407,12 @@ public class StatusDirectMessageAdapter extends RecyclerView.Adapter(cb)), TextView.BufferType.SPANNABLE); holder.binding.poll.multipleChoice.addView(cb); - cb.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnSecondary)); + if (status.account.id.equals(MainActivity.currentUserID)) { + cb.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnPrimary)); + } else { + cb.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnSecondary)); + } + } holder.binding.poll.multipleChoice.setVisibility(View.VISIBLE); holder.binding.poll.singleChoiceRadioGroup.setVisibility(View.GONE); @@ -408,7 +425,12 @@ public class StatusDirectMessageAdapter extends RecyclerView.Adapter(rb)), TextView.BufferType.SPANNABLE); - rb.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnSecondary)); + + if (status.account.id.equals(MainActivity.currentUserID)) { + rb.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnPrimary)); + } else { + rb.setTextColor(ThemeHelper.getAttColor(context, R.attr.colorOnSecondary)); + } holder.binding.poll.singleChoiceRadioGroup.addView(rb); } holder.binding.poll.singleChoiceRadioGroup.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java index a38c15ac7..f9e77b55b 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java @@ -19,7 +19,6 @@ import static app.fedilab.android.BaseMainActivity.currentInstance; import static app.fedilab.android.BaseMainActivity.currentUserID; import android.content.SharedPreferences; -import android.os.Build; import android.os.Bundle; import androidx.appcompat.app.AlertDialog; diff --git a/app/src/main/res/drawables/mastodon/drawable/bubble_left_tail.xml b/app/src/main/res/drawables/mastodon/drawable/bubble_left_tail.xml index 3cec78039..7f93abfd1 100644 --- a/app/src/main/res/drawables/mastodon/drawable/bubble_left_tail.xml +++ b/app/src/main/res/drawables/mastodon/drawable/bubble_left_tail.xml @@ -6,13 +6,13 @@ android:pivotY="100%" android:toDegrees="0"> - + - + diff --git a/app/src/main/res/drawables/mastodon/drawable/bubble_right_tail.xml b/app/src/main/res/drawables/mastodon/drawable/bubble_right_tail.xml index b87980d6e..fa68f846a 100644 --- a/app/src/main/res/drawables/mastodon/drawable/bubble_right_tail.xml +++ b/app/src/main/res/drawables/mastodon/drawable/bubble_right_tail.xml @@ -6,13 +6,13 @@ android:pivotY="100%" android:toDegrees="0"> - + - + diff --git a/app/src/main/res/layouts/mastodon/layout/drawer_status_chat.xml b/app/src/main/res/layouts/mastodon/layout/drawer_status_chat.xml index 70e8398e6..855eef24e 100644 --- a/app/src/main/res/layouts/mastodon/layout/drawer_status_chat.xml +++ b/app/src/main/res/layouts/mastodon/layout/drawer_status_chat.xml @@ -7,7 +7,6 @@ android:layout_height="wrap_content" android:layout_marginHorizontal="@dimen/fab_margin" android:layout_marginTop="12dp" - android:background="@drawable/bubble_right_tail" android:padding="12dp"> @@ -53,7 +50,6 @@ android:layout_marginStart="10dp" android:layout_marginEnd="6dp" android:gravity="end" - android:textColor="?attr/colorOnPrimary" app:layout_constraintBottom_toTopOf="@+id/message_content" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/user_pp" @@ -66,7 +62,6 @@ android:layout_height="wrap_content" android:layout_marginEnd="6dp" android:layout_marginTop="6dp" - android:textColor="?attr/colorOnPrimary" app:layout_constraintTop_toBottomOf="@+id/date" tools:text="@tools:sample/lorem/random" />