我正在使用 array.xml 创建列表并将其填充到 listView 中
问题是我需要在 arrayItem 描述中添加一个超链接文本,这样当我将其填充到 listView 中时,它应该链接到我的网站!
<string-array name="about_us">
<item><b>What is it all about ?</b>\n\this is a mobile application </item>
<item><b>Where all goods go ?</b>Currently the goods can get delivered only in India.</item>
<item><b>How will I Know more?</b>Click [HERE] to go to our website</item>
</string-array>
有什么方法可以直接做吗?
Try this way,hope this will help you to solve your problem.
<string name="link">1.Click <a href="http://www.google.com"> here </a> to goto wesite.</string>
textView.setMovementMethod (LinkMovementMethod.getInstance());
textView.setText(Html.fromHtml(getString(R.string.link)));
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)