开发者

android: html marquee in web-view

开发者_如何学Python

i want to display text in htlm marquee fashion... what should i write in android XML and code?

thanks in advance.


Add this to your XML for the TextView your using.

android:singleLine="true" 
android:ellipsize="marquee"
android:marqueeRepeatLimit ="marquee_forever"
android:scrollHorizontally="true"
android:focusable="true"
android:focusableInTouchMode="true" 


i tried all the code but the best way i got that i show you, so that you can get good result for the webview.

WebView mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);

String summary = "<html><body><MARQUEE>"+tiker+"</MARQUEE></body></html>";

mWebView.loadData(summary, "text/html", "utf-8");

thanks... for helping me.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜