character mapping in edittext android

后端 未结 4 1831
猫巷女王i
猫巷女王i 2021-02-05 22:48

I want to make my edittext like when I write character \"g\" it\'s related mapping custom character should written like here in Hindi it\'s \"जी\"

I think there should

4条回答
  •  一整个雨季
    2021-02-05 22:50

    I guess you are better off looking at creating your own *.ttf file with all character mappings. You can just set it on your EditText (or whatever text widget you are using). TTF fonts are welcome in assets/ directory (or any directory you can read from). You can create Typeface object with:

    Typeface.createFromAsset(AssetManager mgr, String path)

    and setting it with:

    textView.setTypeface(mTypeface);
    

提交回复
热议问题