开发者

AssetManage instantiation

How to properly instantiate AssetManage?

I have a file that I'd like to load and I am getting an error.

Here is what I hav开发者_Go百科e:

     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.

What should be a "handle" in this case?

Thank you


If this is MonoDroid, Java's get*() syntax has been turned into .NET properties, so it's:

AssetManager assetManager = Resources.Assets;


AssetManager assetManager = getResources().getAssets();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜