Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load XML files on disk by default #46371

Closed
wants to merge 1 commit into from

Commits on Sep 9, 2024

  1. Load XML files on disk by default (facebook#46371)

    Summary:
    X-link: facebook/metro#1348
    
    Pull Request resolved: facebook#46371
    
    ## Internal
    
    Vector drawable image support was added in D59530172 but importing vector drawable asset types was not supported out of the box. It required custom source transformers like the one added in D60021474. This is because Android cannot load vector drawable XML over the network. Vector drawables are compiled by AAPT as part of the build process. Even though Metro can serve XML, it would never load.
    
    ## Summary
    
    This adds some minor checks in the `AssetSourceResolver` to only attempt loading XML asset types from disk on the Android platform. XML assets like vector drawables are precompiled and cannot be served over the network by Metro.
    
    ## Changelog
    
    [Android] [Added] - Adds support for importing XML assets as images
    
    Reviewed By: javache
    
    Differential Revision: D62302929
    Abbondanzo authored and facebook-github-bot committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    33c7a14 View commit details
    Browse the repository at this point in the history