Issue
So far I've used the following code to add the icon
EditText email = (EditText) findViewById(R.id.email);
Typeface font = Typeface.createFromAsset( getAssets(), "fontawesome-webfont.ttf" );
email.setTypeface(font);
But the icon gets added as a value of the edittext field. Whereas I want the icon to appear at the left. I also know about the android:drawableLeft attribute but it requires I drawable resource i.e a jpeg and not a ttf. How can I solve this problem. Thanks
Solution
for font awesome in android apps i suggest https://github.com/JoanZapata/android-iconify
but that would not fix your issue as the icon still would be a part of the value. to avoid this you might want to use https://github.com/DayS/EnhancedEditText which uses the android-iconify library to achieve what you want :)
good luck
Answered By - Dodge
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.