Fixed
Status Update
Comments
ki...@google.com <ki...@google.com>
te...@google.com <te...@google.com> #2
The issue is reproducible with core-ktx 1.2.0 and 1.3.0-rc01.
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #3
The Typeface.weight is not a weight of the underlying font file. It is a display style. On older APIs, the display style is adjusted if the Typeface is created from single font. However, after moving to CustomFallbackBuilder, that adjustment is removed since it can crate Typeface from multiple style font files.
Looks like it is good to set display style by ResourcesCompat.getFont for backward compatibility.
Description
Component used: AppCompat Version used: appcompat-1.2.0 Devices/Android versions reproduced on: Oreo, API level 26 & 27
To reproduce:
This arises from the fact that
AppCompatTextView.setCustomActionModeCallback
accepts nullables, but internally calls toTextViewCompat.wrapCustomSelectionActionModeCallback
, which requires a non-null callback.Offending lines:
To fix this, the OreoCallback wrapping should be skipped if the callback is null.