i need to make justify for webview to show Persian(Farsi)/RTL String.
i use below code :
String text = "<html><body>"
+ "<p align=\"justify\">"
+ getString(R.string.test1)
+ "</p> "
+ "</body></html>";
webView.loadData(text, "text/html", "utf-8");
but webview can't show persian character - below image :
what i to do?
Ok , Finally i found a good way to make justify + using "\n" + all other customize for String.
Load data to WebView to thisway :
webView.loadUrl("file:///android_asset/string.htm");
webView.loadDataWithBaseURL(null, yourString, "text/html", "utf-8", null);