开发者

Show Urdu characters in Android EditText

开发者 https://www.devze.com 2023-04-05 22:24 出处:网络
Encoding Urdu in开发者_如何学编程 Android I want to develop an application , in which i want to store Urdu string into SqlLite database, i need to input Urdu Characters into EditText so i can copy an

Encoding Urdu in开发者_如何学编程 Android

I want to develop an application , in which i want to store Urdu string into SqlLite database, i need to input Urdu Characters into EditText so i can copy and insert into Database, and like wise, i want to display Stored Urdu data into EditText or in List Column


To do this we need the font file for Urdu fonts. For example ,we have the Urdu font file name as urdufont.ttf. Save this file into the assets folder then use the bellow code

edittext.setTypeface(Typeface.createFromAsset(getContext().getAssets(),"urdufont.ttf"));
dittext.setText("ur text");

Like wise we can set any type of text with out using the Locale

first download the urdu font file from intetnet ,then follow the above instructions.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号