android - Apply Font Family on TextView -


i new in android. in app have number of textviews , want apply different font family on textview along number's of following condition:

1: textview should never extend i.e don't want create custom textview 2: don't want set font on run time i.e first reference of textview in code set programmitically  using settype method. 3: want xml tag "customefontfamily" , tag can provide different font family on different textview. 

i read this link shows first android default font family. after 500 mili seconds changes font family defined in xml .

any on problem appreciated! thank in advance!

your requirements:

1: don't want create custom textview extending textview

2: don't want set font @ run time.

3: want use custom xml attribute "customfontfamily"

under these requirements, there no solution problem.

none of views in android sdk have code handle custom xml attributes define. if want use custom xml attributes, have subclass textview. if don't subclass textview, have no choice set typeface @ runtime. that's there it.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -