Android 9 chat message focused bug fix

This commit is contained in:
Yuriy Liskov
2022-07-10 20:28:24 +03:00
parent 077c42278b
commit 2684464414
4 changed files with 18 additions and 10 deletions

View File

@ -785,9 +785,11 @@ public class MessageHolders {
text.setTypeface(text.getTypeface(), style.getIncomingTextStyle());
text.setAutoLinkMask(style.getTextAutoLinkMask());
text.setLinkTextColor(style.getIncomingTextLinkColor());
configureLinksBehavior(text);
// Should come after link configurator. Because it makes textView focusable.
text.setFocusable(style.isMessageFocusable());
// Link configurator makes textView focusable.
if (style.isMessageFocusable()) {
configureLinksBehavior(text);
}
}
}
@ -846,9 +848,11 @@ public class MessageHolders {
text.setTypeface(text.getTypeface(), style.getOutcomingTextStyle());
text.setAutoLinkMask(style.getTextAutoLinkMask());
text.setLinkTextColor(style.getOutcomingTextLinkColor());
configureLinksBehavior(text);
// Should come after link configurator. Because it makes textView focusable.
text.setFocusable(style.isMessageFocusable());
// Link configurator makes textView focusable.
if (style.isMessageFocusable()) {
configureLinksBehavior(text);
}
}
}

View File

@ -1,3 +1,4 @@
<!-- MODIFIED: Android 9 message focused bug fix (RelativeLayout focusable="false") -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@ -5,7 +6,8 @@
android:layout_marginBottom="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp">
android:layout_marginTop="8dp"
android:focusable="false">
<com.stfalcon.chatkit.utils.ShapeImageView
android:id="@id/messageUserAvatar"

View File

@ -1,3 +1,4 @@
<!-- MODIFIED: Android 9 message focused bug fix (RelativeLayout focusable="false") -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@ -5,7 +6,8 @@
android:layout_marginBottom="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp">
android:layout_marginTop="8dp"
android:focusable="false">
<com.google.android.flexbox.FlexboxLayout
android:id="@id/bubble"

View File

@ -59,8 +59,8 @@ android {
applicationId "com.liskovsoft.smarttubetv"
minSdkVersion project.properties.minSdkVersion
targetSdkVersion project.properties.targetSdkVersion
versionCode 706
versionName "15.16"
versionCode 708
versionName "15.18"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"