Yes, we have wrappers for existing Android views
# compose
r
Yes, we have wrappers for existing Android views
n
Is there a example available?
r
Of creating wrappers or using them?
n
Both.
r
You'll find both in the source tree
I'm not at a computer now so can't look for their exact location
n
Can the views be incorporated without having to use a separate XML layout?
r
Yep
That's not new, you never had to use XML layouts before
n
Can you please elaborate further.
r
XML was always optional to create layouts, that's not changing (for old views integration)
n
From what I understand views could be done using the standard Android APIs, however there were no style APIs hence all styles had to be defined in XML files.
Lack of style APIs is one of the major reasons why Android developers couldn't declaratively do views in code, unless the app being developed doesn't use styles which is unlikely.
r
Styles have to be in XML (although...) but Views themselves can be used programmatically
n
Will that change later on (especially with many styles being dynamic)? What do you mean by although with styles (is there a catch involved)?
g
Styles for Views are in XML and Views work with them using styled attribute and theme API, Compose has nothing like that now, own style definition API defined in code, check source code, there are many examples