Obsolete
Status Update
Comments
da...@google.com <da...@google.com>
da...@google.com <da...@google.com> #2
The issue is reproducible with core-ktx 1.2.0 and 1.3.0-rc01.
da...@google.com <da...@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
This requests adding XML support for the data class attribute, and though it's trivial to add support for it, the Studio integration that results from it is a little sloppy. Instead of trying to fix everything all at once, I thought I'd break this down into two bugs.
The above (linked) bug covers just making sure the XML doesn't show an error. We'll get that one in for 3.5.
This bug is more comprehensive. Specifically, we should make sure the following UX feels good:
* We should provide code completion for the attribute (it should auto complete to packages in the
current module)
* We should provide inspection information for invalid values (while initially auto completing to a
package is a good start, you still need to add an actual class name; it would be nice if
<data class="com.example.mymodule"> was underlined in red with useful information about what to
do next. Also, setting the data class to an existing class is also bad and should be prevented.
* Currently, the code that generates the correct LightBinding class seems to kind of work but only
sometimes. This neeeds to be investigated. Change <data class="..."> and the new LightBinding class
should be ready IMMEDIATELY (and old references need to start showing as invalid immediately as well)