所以我有一些文字一個TextView如下如何TextView中的部分鏈接到活動
一些文字....一些文字....一些文字....一些文字...一些文字....一些文字....一些文字....一些文字...... href.link ......其他一些文字.....其他一些文字。 .....其他一些文字.....其他一些文字....其他一些文字...
我只想讓文字的鏈接部分在點擊時啓動另一個活動。我試圖做到這一點在Xamarin,至今我也做了以下內容:
TextView1.SetText(Html.FromHtml("<span>some text...<a href='example://'></a>...some other text </span>"
在我的目標活動:
[IntentFilter(new[] { Intent.ActionView },
DataScheme = "example",
Categories = new[] { Intent.CategoryDefault })]
,我猜是equivlent到:
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="example" />
</intent-filter>
不知道在這裏設置什麼方案。
最好保持2個textViews很近才達到你的目標 – 2014-09-11 11:34:20
您可以使用HTML與Html.fromHtml() – zgc7009 2014-09-11 11:45:48
入住此http格式://stackoverflow.com/questions/1697084鏈接可能有所幫助。 – Pankaj 2014-09-11 14:21:04