-3

Typeface.createFromAsset(AssetManager manager,String path); 这个怎么用?

AssetManager mgr;
tf = Typeface.createFromAsset(mgr, font);
TextView txtName = (TextView) convertView.findViewById(R.id.txtTitle);
txtName.setText(novena.getName());
txtName.setTypeface(tf);

如何初始化经理?

你可以使用 tf = Typeface.createFromAsset(context.getAssets(), font);

4

2 回答 2

5

像这样:

AssetManager mgr;
...
mgr = getAssets();
于 2013-04-22T15:36:50.540 回答
5
//If you are inside of an ACtivity, and NOT inside of an inner class
AssetManager mgr = getAssets();
于 2013-04-22T15:36:57.790 回答