diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index b67a37f2b..c28d63c40 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -3787,14 +3787,15 @@ public class ConversationFragment extends XmppFragment if (activity != null) { activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); } - final var cursord = activity.getDrawable(R.drawable.cursor_on_tertiary_container); + //final var cursord = activity.getDrawable(R.drawable.cursor_on_tertiary_container); + /* if (activity.xmppConnectionService != null && activity.xmppConnectionService.getAccounts().size() > 1) { final var bg = MaterialColors.getColor(binding.textinput, com.google.android.material.R.attr.colorSurface); final var accountColor = conversation.getAccount().getColor(activity.isDark()); final var colors = MaterialColors.getColorRoles(activity, accountColor); final var accent = activity.isDark() ? ColorUtils.blendARGB(colors.getAccentContainer(), bg, 1.0f - Math.max(0.25f, Color.alpha(accountColor) / 255.0f)) : colors.getAccentContainer(); cursord.setTintList(ColorStateList.valueOf(colors.getOnAccentContainer())); - //binding.inputLayout.setBackgroundTintList(ColorStateList.valueOf(accent)); + binding.inputLayout.setBackgroundTintList(ColorStateList.valueOf(accent)); binding.textinputSubject.setTextColor(colors.getOnAccentContainer()); binding.textinput.setTextColor(colors.getOnAccentContainer()); @@ -3803,7 +3804,7 @@ public class ConversationFragment extends XmppFragment binding.textInputHint.setTextColor(colors.getOnAccentContainer()); } else { cursord.setTintList(ColorStateList.valueOf(MaterialColors.getColor(binding.textinput, com.google.android.material.R.attr.colorOnTertiaryContainer))); - //binding.inputLayout.setBackgroundTintList(ColorStateList.valueOf(MaterialColors.getColor(binding.inputLayout, com.google.android.material.R.attr.colorTertiaryContainer))); + binding.inputLayout.setBackgroundTintList(ColorStateList.valueOf(MaterialColors.getColor(binding.inputLayout, com.google.android.material.R.attr.colorTertiaryContainer))); binding.textinputSubject.setTextColor(MaterialColors.getColor(binding.textinputSubject, com.google.android.material.R.attr.colorOnTertiaryContainer)); binding.textinput.setTextColor(MaterialColors.getColor(binding.textinput, com.google.android.material.R.attr.colorOnTertiaryContainer)); @@ -3811,10 +3812,12 @@ public class ConversationFragment extends XmppFragment binding.textinput.setHintTextColor(R.color.hint_on_tertiary_container); binding.textInputHint.setTextColor(MaterialColors.getColor(binding.textInputHint, com.google.android.material.R.attr.colorOnTertiaryContainer)); } + if (Build.VERSION.SDK_INT >= 29) { binding.textinputSubject.setTextCursorDrawable(cursord); binding.textinput.setTextCursorDrawable(cursord); } + */ setThread(conversation.getThread()); setupReply(conversation.getReplyTo()); diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml index a4161a2a2..dd305cf02 100644 --- a/src/main/res/layout/fragment_conversation.xml +++ b/src/main/res/layout/fragment_conversation.xml @@ -206,10 +206,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/subject" - android:textColor="?colorOnTertiaryContainer" - android:textColorHint="@color/hint_on_tertiary_container" - android:textCursorDrawable="@drawable/cursor_on_tertiary_container" - android:layout_above="@+id/textsend" + android:textColor="?colorControlNormal" + android:textColorHint="?colorControlNormal" android:maxLines="1" android:textSize="16sp" android:padding="8dp" @@ -227,7 +225,7 @@ android:layout_marginHorizontal="60dp" android:textSize="14sp" android:textStyle="bold|italic" - android:textColor="?colorOnTertiaryContainer" + android:textColor="?colorControlNormal" android:visibility="visible" tools:text="@string/private_message_to" /> @@ -308,9 +306,8 @@ android:maxLines="8" android:minHeight="32dp" android:textSize="16sp" - android:textColor="?colorOnTertiaryContainer" - android:textColorHint="@color/hint_on_tertiary_container" - android:textCursorDrawable="@drawable/cursor_on_tertiary_container" + android:textColor="?colorControlNormal" + android:textColorHint="?colorControlNormal" android:minLines="1">