土耳其的字符不上的TextView显示 [英] Turkish characters are not shown on TextView
本文介绍了土耳其的字符不上的TextView显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
土耳其字符不会对的TextView
所示。我已阅读previous问题,并做了一些变化,他们没有解决我的问题。下面是图片:
这是我改变code:
<$p$p><$c$c>holder.txtGazeteName.setText(Html.fromHtml(gazetelerArrayList.get(position).getName()).toString());这里是ArrayList的输入
gazete =新GazetelerClass();
gazete.setName(YeniŞafak);
gazete.setAdress(http://www.yenisafak.com.tr/yazarlar/);
gazete.setImage(R.drawable.yenisafak);
gazetelerArrayList.add(gazete);
解决方案
我解决我的问题。下面是解决方法:
在的build.gradle(模块:APP)添加了这个$ C $ C:
compileOptions.encoding ='Windows的1254'
在这里的gradle构建文件
应用插件:'com.android.application安卓{ compileSdkVersion 22
buildToolsVersion21.1.2
compileOptions.encoding ='Windows的1254'
defaultConfig {
的applicationIDyazlm.beyaz.keyazarlar
14的minSdkVersion
targetSdkVersion 22
版本code 1
的versionName1.0 }
buildTypes {
发布 {
minifyEnabled假
proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro }
}}依赖{
编译文件树(导演:'库',包括:['的* .jar'])
编译com.android.support:appcompat-v7:22.1.1}
Turkish characters are not shown on TextView
. I have read previous questions and did some changes and they are not solved my problem. Here is picture:
Here is my changed code:
holder.txtGazeteName.setText(Html.fromHtml(gazetelerArrayList.get(position).getName()).toString());
here is input for ArrayList
gazete = new GazetelerClass();
gazete.setName("YeniŞafak");
gazete.setAdress("http://www.yenisafak.com.tr/yazarlar/");
gazete.setImage(R.drawable.yenisafak);
gazetelerArrayList.add(gazete);
解决方案
I solved my problem. Here is solution:
in build.gradle(module:app) added this code:
compileOptions.encoding = 'windows-1254'
here is build gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
compileOptions.encoding = 'windows-1254'
defaultConfig {
applicationId "yazlm.beyaz.keyazarlar"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
}
这篇关于土耳其的字符不上的TextView显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文