1

Monodroid を使用してアプリを作成していますが、カスタム フォントの作成方法がわかりません。

以下は私のコードです

TextView text = FindViewById<TextView>(Resource.Id.tvchange);
Typeface tf = Typeface.CreateFromAsset(Assets,"fonts/gt.otf");
text.SetTypeface(tf);

Monodroid には getAssets() がないため、書体が正しいかどうかtext.SetTypeface(tf); はわかりません。2 番目の引数はわかりません。

ありがとう

4

1 に答える 1

0

問題がわかった

ここに以下のコードがあります

 Typeface tf = Typeface.CreateFromAsset(Application.Context.Assets, "fonts/gt.otf");
 TextView ExplodeVin = FindViewById<TextView>(Resource.Id.tvExVin);
 ExplodeVin.SetTypeface(tf,TypefaceStyle.Normal);
于 2013-07-10T20:10:35.110 に答える