Building Mobile Enterprise Applications : Using webMethods Mobile Designer : Coding a Mobile Application : Asset Catalogs : Importing an Asset Catalog with ResHandler
Importing an Asset Catalog with ResHandler
The AntTaskResourceHandler class now includes an extra method, addDirContentAsAssetCatalogs(String dir). This method includes all sub-directories of the indicated folder as asset catalogs in the application. So, for a project's resources directory structured as follows:
resources
+---assetcatalogs
| +---android
| | +---drawable
| | +---drawable-hdpi
| | +---drawable-ldpi
| | +---drawable-xhdpi
| | +---drawable-xxhdpi
| | \---drawable-xxxhdpi
| +---ios
| | \---AppAssets.xcassets
| +---winphone
| | \---catalog
| | \---scale100
| \---wintablet
| \---catalog
| +---scale100
| +---scale140
| \---scale180
Appropriate code to include resources for an Android handset would be:
rh.setResourceReadSubdirectory("assetcatalogs");
rh.addDirContentAsAssetCatalogs("android");
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback