Skip to content

Simple test to compare two public methods of Android text formatting

Notifications You must be signed in to change notification settings

AShuba/SpannableTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spannable vs fromHtml

There are different methods to format text inside Android TextView.

Current test just makes bold, italic, green text and applies it to TextView.

My Nexus 4 shows next results

  • HTML formatting - about 3000000 nsec
  • SpannableBuilder - about 600000 nsec

So use SpannableBuilder for text formatting instead of HTML tags where it possible :-)

About

Simple test to compare two public methods of Android text formatting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages