TextView 上不显示土耳其字符
Turkish characters are not shown on TextView
TextView
上未显示土耳其语字符。我已经阅读了以前的问题并做了一些更改,但它们并没有解决我的问题。这是图片:
这是我修改后的代码:
holder.txtGazeteName.setText(Html.fromHtml(gazetelerArrayList.get(position).getName()).toString());
这里是 ArrayList
的输入
gazete = new GazetelerClass();
gazete.setName("YeniŞafak");
gazete.setAdress("http://www.yenisafak.com.tr/yazarlar/");
gazete.setImage(R.drawable.yenisafak);
gazetelerArrayList.add(gazete);
我认为这个线程应该可以为您解决问题。我记得有过类似的问题。 Android. WebView and loadData
我解决了我的问题。这是解决方案:
在 build.gradle(module:app) 中添加了这段代码:
compileOptions.encoding = 'windows-1254'
这里是构建 gradle 文件
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
上未显示土耳其语字符。我已经阅读了以前的问题并做了一些更改,但它们并没有解决我的问题。这是图片:
这是我修改后的代码:
holder.txtGazeteName.setText(Html.fromHtml(gazetelerArrayList.get(position).getName()).toString());
这里是 ArrayList
的输入gazete = new GazetelerClass();
gazete.setName("YeniŞafak");
gazete.setAdress("http://www.yenisafak.com.tr/yazarlar/");
gazete.setImage(R.drawable.yenisafak);
gazetelerArrayList.add(gazete);
我认为这个线程应该可以为您解决问题。我记得有过类似的问题。 Android. WebView and loadData
我解决了我的问题。这是解决方案:
在 build.gradle(module:app) 中添加了这段代码:
compileOptions.encoding = 'windows-1254'
这里是构建 gradle 文件
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'
}