首页 > 解决方案 > 无法在android应用程序中将文本从英语转换为印地语

问题描述

我正在构建一个应用程序,它从arraylist 中搜索名称并显示我们在edittext 中搜索的结果。我的arraylist 包含印地语字体的名称,我想在edittext 中使用默认的英文字体。同样在下面我保留了textview,它必须显示我在edittext中输入的印地语文本。看我的代码:

Typeface hindi = Typeface.createFromAsset(getAssets(),"fonts/hindifont.ttf"); textview.setText(edittext.getText().toString()); textview.setTypeface(hindi);

但它没有在 textview 中显示印地语字体,而是在 edittext 中显示英语。

标签: androidandroid-studiofontstypeface

解决方案


推荐阅读