AssetManage实例化

dro*_*ter 1 mobile android xamarin.android

如何正确实例化AssetManage?

我有一个文件,我想加载,我收到一个错误.

这是我有的:

     AssetManager assetManager = new AssetManager(handle);

     Typeface tf = Typeface.CreateFromAsset(assetManager, "fonts/calibri.ttf");

     this._textView.SetTypeface(tf, 0); // i just need a regular calibri, I added a file into the fonts folder and set it to AndroidAsset.
Run Code Online (Sandbox Code Playgroud)

在这种情况下应该是什么"句柄"?

谢谢

jpo*_*bst 5

如果这是MonoDroid,Java的get*()语法已经变成了.NET属性,所以它是:

AssetManager assetManager = Resources.Assets;
Run Code Online (Sandbox Code Playgroud)