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();
精彩评论