r

    romainguy

    3 years ago
    Yes, we have wrappers for existing Android views
    n

    napperley

    3 years ago
    Is there a example available?
    r

    romainguy

    3 years ago
    Of creating wrappers or using them?
    n

    napperley

    3 years ago
    Both.
    r

    romainguy

    3 years ago
    You'll find both in the source tree
    I'm not at a computer now so can't look for their exact location
    n

    napperley

    3 years ago
    Can the views be incorporated without having to use a separate XML layout?
    r

    romainguy

    3 years ago
    Yep
    That's not new, you never had to use XML layouts before
    n

    napperley

    3 years ago
    Can you please elaborate further.
    r

    romainguy

    3 years ago
    XML was always optional to create layouts, that's not changing (for old views integration)
    n

    napperley

    3 years ago
    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

    romainguy

    3 years ago
    Styles have to be in XML (although...) but Views themselves can be used programmatically
    n

    napperley

    3 years ago
    Will that change later on (especially with many styles being dynamic)? What do you mean by although with styles (is there a catch involved)?
    gildor

    gildor

    3 years ago
    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