-
Notifications
You must be signed in to change notification settings - Fork 78
Other click view not clickable #30
Copy link
Copy link
Open
Description
When i use this lib in adapter, onClick/onLongClick events are working for only links. If i type simple text and tring to click or long click no action, even parent view does not handle these actions.
viewHolder.itemView.messageTv?.let {
it.movementMethod = BetterLinkMovementMethod.getInstance()
Linkify.addLinks(it, Linkify.WEB_URLS)
BetterLinkMovementMethod
.linkify(Linkify.WEB_URLS, it)
.setOnLinkClickListener { _: TextView?, url: String? ->
val uri = Uri.parse(url)
val intent = Intent(Intent.ACTION_VIEW, uri)
intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.packageName)
if (intent.resolveActivity(context.packageManager) != null) {
context.startActivity(intent)
}
true
}
.setOnLinkLongClickListener { _: TextView?, _: String? ->
context.onItemLongClick(viewHolder.adapterPosition)
true
}
} Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels