简体   繁体   English

Android:我对 TextViews 的选取框功能有一些问题

[英]Android: I have some problems with the marquee-feature of TextViews

I have some problems with the marquee-feature of TextViews.我对 TextViews 的选取框功能有一些问题。 I want to have a scrolling newsticker like this:我想要一个像这样的滚动newsticker:

News 1 -- News 2 -- News 3新闻 1 -- 新闻 2 -- 新闻 3

When a new news enters it must append with previous one as below,当一个新消息进入时,它必须是 append 和上一个如下,

News 1 -- News 2 -- News 3 -- news 4新闻 1 -- 新闻 2 -- 新闻 3 -- 新闻 4

How can i implement this?我该如何实施?

Thanks in advance.提前致谢。

Maybe you would like reading this thread .也许你想阅读这个线程

Regards, Stéphane问候, 斯蒂芬

Take a webview in xml.在 xml 中取一个 webview。 from code you declare the webview.从您声明 webview 的代码中。 In that webview..在那个 webview..

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

String summary = ""+your data+"";字符串摘要 = ""+你的数据+"";

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

it will help you.它会帮助你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM