The key class is AssetManager, use Context:getAssets() to get the AssetManager object.
To open a file:
InputStream is = context.getAssets().open("foo");
To open a binary XML file. Be notice the XML files under assets folder will not be complied into binary file, so you have to use AssetManager.open() for them.
XMLResourceParser parser = myContext.getAssets().openXmlResourceParser("xml");
And also can list all the asset files:
String[] list = myContext.getAssets().open("sample/foo");
Subscribe to:
Post Comments (Atom)
Enable HP Zbook Thunderbolt 3 Dock on Ubuntu
As mention in previously post, I installed Ubuntu on my HP ZBook. After two days used all things work just fine, but the Thunderbolt 3 Dock ...
-
As mention in previously post, I installed Ubuntu on my HP ZBook. After two days used all things work just fine, but the Thunderbolt 3 Dock ...
-
To create a button in Android app like this: The layout XML: <Button android:layout_width="match_parent" andro...
-
Recently I tried to setup and build react-native app (mostly for Android), behind a proxy server. To pass the gradle build, need set proxy c...
No comments:
Post a Comment