I am developing an app which needs to align justification for substring of html string.
Issue: I have used webview to set justification for html text by using following code
String htmlText = "<html><body style=\"text-align:justify\"> %s </body></Html>";
WebView webView = new WebView(SubProducts.this);
webView.loadData(String.format(htmlText, description), "text/html", "utf-8");
but when I set the same idea for substring like this:
String htmlText = "<html><body style=\"text-align:justify\"> %s </body></Html>";
WebView webView = new WebView(SubProducts.this);
webView.loadData(String.format(htmlText, description.substring(1,170)), "text/html", "utf-8");
in my output text html text(
<html><body style=\"text-align:justify\"> %s </body></Html>)
is also visible.How to achieve this.Could anybody help me? Thanks in advance.
\r\n\tthis is a sample textview . which shows complete details about my product.
\r\n", I need to show substring of this in justified format. – Neeha Apr 16 '13 at 07:13