• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Any raw assets you want to be deployed with your application can be placed in
2this directory (and child directories) and given a Build Action of "AndroidAsset".
3
4These files will be deployed with your package and will be accessible using Android's
5AssetManager, like this:
6
7public class ReadAsset : Activity
8{
9	protected override void OnCreate (Bundle bundle)
10	{
11		base.OnCreate (bundle);
12
13		InputStream input = Assets.Open ("my_asset.txt");
14	}
15}
16
17Additionally, some Android functions will automatically load asset files:
18
19Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20