【发布时间】:2010-11-28 13:49:40
【问题描述】:
我要完成的工作:在 DialogPreference 显示的消息文本中创建一个可点击的超链接。
到目前为止我的解决方案: 关注这个话题:link,我完成了在 DialogPreference 中显示的格式化超链接,但是这个超链接不可点击。
问题:如何在 DialogPreference 中使超链接可点击。
我的代码:
public class AboutDialog extends DialogPreference {
public AboutDialog(Context oContext, AttributeSet attrs)
{
super(oContext, attrs);
final SpannableString s = new SpannableString(oContext.getText(R.string.about_text));
Linkify.addLinks(s, Linkify.ALL);
this.setDialogMessage(s);
}}
【问题讨论】:
标签: android user-interface hyperlink