How to give autolink for some part of textview ? For example : My text inside TextView is "Please click here to open this webpage". I want to show link for only the text "here". And I should open that webpage onclick of the text "here" but not on the anywhere of TextView. Please help me.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
use simple Url in strings.xml :
And in Java code write this:
Textviews are capable of displaying HTML, which solves your problem. Wrap what you want clickable in a hyperlink:
Use HTML syntax in strings.xml:
Set TextView properties to have links clickable and auto link.
You can test it with following code:
Put a String in string.xml
And you can use it in textView like this:
EDIT
For some reason above code does not work properly. So, add below code also,