Created
May 24, 2017 03:22
-
-
Save NickJian/74685daf693c4811be5f3ec2a983f408 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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