Imported Upstream version 1.34.0
[platform/upstream/grpc.git] / examples / csharp / HelloworldXamarin / HelloworldXamarin.Android / Assets / AboutAssets.txt
1 Any raw assets you want to be deployed with your application can be placed in
2 this directory (and child directories) and given a Build Action of "AndroidAsset".
3
4 These files will be deployed with your package and will be accessible using Android's
5 AssetManager, like this:
6
7 public 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
17 Additionally, some Android functions will automatically load asset files:
18
19 Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");