Показаны сообщения с ярлыком font. Показать все сообщения
Показаны сообщения с ярлыком font. Показать все сообщения

понедельник, 15 сентября 2014 г.

Library projects cannot include raw assets


The tools do not support the use of raw asset files (saved in the assets/ directory) in a library project. Any asset resources used by an application must be stored in the assets/ directory of the application project itself. However, resource files saved in the res/ directory are supported.


И никаких шрифтов в assets библиотек больше!

среда, 21 сентября 2011 г.

कस्टम font in two steps

1.
put font file to assets/fonts/myfont.ttf

2.

Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/myfont.ttf");
TextView text = (TextView)findViewById(R.id.my_text);
text.setTypeface(tf);

That's all.

P.S. कस्टम is a result of auto replacement of blogger or my browser. The original word is "custom" :)