我的应用程序从在线服务器检索数据。如果我在应用程序中插入像 Hello 这样的服务器,如果您点击上方,则不会引导任何地方。为什么?这是来源
MyText = (TextView) this.findViewById(R.art.tit);
Text = (TextView) this.findViewById(R.artic.text);
String formattedText = db.getTesto();
String formattedTitle = db.getTitolo();
MyText.setText(Html.fromHtml(formattedTitle));
Text.setText(Html.fromHtml(formattedText));
最佳答案
这是超链接的示例:
MyText = (TextView) this.findViewById(R.art.tit);
Text = (TextView) this.findViewById(R.artic.text);
tv1.setLayoutParams(textOutLayoutParams);
tv1.setText(Html.fromHtml("<a href=\""+ formattedText + "\">" + formattedTitle + "</a>"));
tv1.setClickable(true);
tv1.setMovementMethod (LinkMovementMethod.getInstance());
dialogLayout.addView(tv1);
关于java - java 的 href 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17825343/