CrabtreeOn,印度客户定制APP,迁移2.0平台版本
JLChen
2022-01-12 407fae6f07a2a982a2a814c2f145c40733c966cb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 your 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");