【发布时间】:2014-06-04 10:20:11
【问题描述】:
我遇到了这种有线情况,我的代码如下
LinearLayout ll = new LinearLayout(this);
TextView tv = new TextView(this);
ll.addView(tv);
tv.setText(Html.fromHtml("<a STYLE=\"text-decoration:none;\" href=\""
+ StringEscapeUtils.escapeJava(elem.getChildText("newsLink")) + "\">"
+ StringEscapeUtils.escapeJava(elem.getChildText("Title")) + "</a>"));
tv.setTextColor(Color.BLACK);
但是style="text-decoration:none" 和tv.setTextColor(color.black)都不起作用,链接仍然是蓝色的,带有下划线,有什么提示为什么它们不起作用?谢谢!
【问题讨论】:
-
我尝试了第二个,但不起作用,我想知道为什么
标签: android textcolor text-decorations