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.
精彩评论