开发者

android/java replace string to bold or some color in webview in html

i have a string ticker.. ticker="hdfc:123:-1.90 tcc:231:+1.3 as continue to hundreds of

ticker will get from the server. i just want to bold the name... so help me to find my solution.....

here is my code...

tiker = TickerConnection.getInstance().Ticker();

    WebView mWebView = (WebView) findViewById(R.id.webview);
    mWebView.getSettings().setJavaScriptEnabled(true);String summary = "<html><body><MARQUEE>"+tiker+"</MARQUEE></body></html>";
mWebV开发者_如何学编程iew.loadData(summary, "text/html", "utf-8");


hey following is ur solution... u jst have to add tag <b>

tiker = TickerConnection.getInstance().Ticker();

    WebView mWebView = (WebView) findViewById(R.id.webview);
    mWebView.getSettings().setJavaScriptEnabled(true);String summary = "<html><body><MARQUEE><b>"+tiker+"</b></MARQUEE></body></html>";
mWebView.loadData(summary, "text/html", "utf-8");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜