Setting font to textView in Android

/* This is code snippet for setting font styles to text in android. Download your required font & put your font in assets folder in your project and use the below snippet */ private Typeface typeFace = Typeface.createFromAsset(getAssets(),"fontname.ttf"); TextView mTextView = (TextView)findViewById(R.id.textview); mTextView.setTypeface(typeFace );
Code snippet for setting font styles to text in Android.

Download your required font & put your font in assets folder in your project and use the above snippet .

#font #textView #android

#cesarnog

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.