0

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:

enter image description here

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);
Beyaz
  • 138
  • 1
  • 13

2 Answers2

2

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'

}
Beyaz
  • 138
  • 1
  • 13
0

I think this thread should do the trick for you. I remembered having a similar kind of problem. Android. WebView and loadData

Community
  • 1
  • 1
jbrulmans
  • 975
  • 1
  • 11
  • 32
  • mate i dont use webview. and searched similiar problems and all of them use webview. my problem occur in textview. I should accamplish to show turkish character in textview – Beyaz May 18 '15 at 18:01