Mobile Development 10.11 | webMethods Mobile SuiteWeb Help | Using webMethods Mobile Designer | Creating Mobile Application Projects | Coding a Mobile Application | Asset Catalogs | Importing an Asset Catalog Using the Resource Handler
 
Importing an Asset Catalog Using the Resource Handler
The AntTaskResourceHandler class contains the method addDirContentAsAssetCatalogs(String dir). This method includes all sub-directories of the indicated folder as asset catalogs in the application. As an example, the resources directory of a project may be structured as follows:
resources
+---assetcatalogs
| +---android
| | +---drawable
| | +---drawable-hdpi
| | +---drawable-ldpi
| | +---drawable-xhdpi
| | +---drawable-xxhdpi
| | \---drawable-xxxhdpi
| +---ios
| | \---AppAssets.xcassets
The following code would then add the asset catalog for an Android handset:
rh.setResourceReadSubdirectory("assetcatalogs");
rh.addDirContentAsAssetCatalogs("android");