Skip to content

Instantly share code, notes, and snippets.

@NickJian
Created May 24, 2017 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NickJian/74685daf693c4811be5f3ec2a983f408 to your computer and use it in GitHub Desktop.
Save NickJian/74685daf693c4811be5f3ec2a983f408 to your computer and use it in GitHub Desktop.
// the textview to show the image
TextView tv1=(TextView)findViewById(R.id.textview);
Typeface typeface=Typeface.createFromAsset(getAssets(),"fonts/iconfont.ttf");
tv1.setTypeface(typeface);
// the unicode you add in tff
// instead of hard code it here, you should put it to your string file or make it to constant, so that it can be managed better.
tv1.setText("\ue600");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment