dimanche 17 mai 2015

Custom Font in Android WebView issue

I am facing issue in see Gujarati Language in WebView of my one android news application. I have got success in see gujarati language in TextView....I have tried many tutorial for find solution of webView custom font. My code is like below for webView. Please check and help me for get solved it !

String mimeType = "text/html; charset=UTF-8";
        String encoding = "UTF-8";
        String htmlText = allArrayNewsDes[position];

        String text = "<html><head>"
                + "<style type=\"text/css\">body{color: #525252;}"
                + "</style></head>"
                + "<body>"                          
                +  htmlText
                + "</body></html>";

        webnewsdes.loadData(text, mimeType, encoding);

        container.addView(imageLayout, 0);
        return imageLayout;

    }

Aucun commentaire:

Enregistrer un commentaire