Skip to content
Permalink
Browse files
Create AboutAssets.txt
  • Loading branch information
miahs26 committed Dec 13, 2020
1 parent 2eb6bad commit c5951d9335833d1b89078e40c3aaccf370c357ef
Showing 1 changed file with 19 additions and 0 deletions.
@@ -0,0 +1,19 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".

These files will be deployed with you package and will be accessible using Android's
AssetManager, like this:

public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);

InputStream input = Assets.Open ("my_asset.txt");
}
}

Additionally, some Android functions will automatically load asset files:

Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

0 comments on commit c5951d9

Please sign in to comment.