0
在我的android应用程序中,我有一个textview,我使用它作为打开网站的链接。但是当点击textView
a alert pops up
浏览器没有响应。使用TextView作为Android应用程序的链接?
<string name="MoneyControl"><a href="http://www.moneycontrol.com/stocksmarketsindia/"> 1. Money Control</a></string>
<TextView
android:id="@+id/moneycontrol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/MoneyControl"
android:textSize="15dp" />
link = (TextView) findViewById(R.id.moneycontrol);
if (link !=null){
link.setMovementMethod(LinkMovementMethod.getInstance());
}
尝试设置这样'机器人:自动链接= “网络”''机器人:linksClickable = “真”'你'TextView'和删除'link.setMovementMethod(LinkMovementMethod.getInstance());' –
试试这个http://stackoverflow.com/a/11259909/1012284 –
@简单的计划对我来说不起作用。 –