Fixed
Status Update
Comments
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #2
Or when changing to textView.textMetricsParamsCompat still crash.
private fun setAsyncText(textView: AppCompatTextView, text: String?) {
if (!text.isNullOrEmpty()) {
val textFuture = PrecomputedTextCompat.getTextFuture(text!!, textView.textMetricsParamsCompat, null)
textView.setTextFuture(textFuture) //Crash
}
}
private fun setAsyncText(textView: AppCompatTextView, text: String?) {
if (!text.isNullOrEmpty()) {
val textFuture = PrecomputedTextCompat.getTextFuture(text!!, textView.textMetricsParamsCompat, null)
textView.setTextFuture(textFuture) //Crash
}
}
pr...@google.com <pr...@google.com> #3
add this line :
textView.setLayoutDirection(ViewCompat.getLayoutDirection(textView));
before :
setTextFuture(....)
textView.setLayoutDirection(ViewCompat.getLayoutDirection(textView));
before :
setTextFuture(....)
Description
AndroidX core features the
androidx.core.os.CancellationSignal
type which backported theandroid.os.CancellationSignal
type to API levels prior to 16. Now that the minimum supported API level of the AndroidX libraries is 19, this type can be deprecated.However, it's not just that simple because this type is used in the public API elsewhere. Those usages should be migrated to accept the framework version before the AndroidX type is deprecated.
Fromhttps://android-review.googlesource.com/c/platform/frameworks/support/+/2816836/comment/2fce6759_bb364691/