Questions tagged [linkmovementmethod]

This is a Java movement method in the Android API that traverses links in the text buffer and scrolls if necessary. Supports clicking on links with DPad Center or Enter.

A movement method that traverses links in the text buffer and scrolls if necessary. Supports clicking on links with DPad Center or Enter.

Link.

29 questions
9
votes
2 answers

How to make links among other text focusable for accessibility

I have a CheckedTextBox whose text is made up of two SpannableStrings, one of which is a URLSpan. My question is, how do I make so that a user can move the accessibility focus through each span, eventually focusing on the URLspan itself?…
VIN
  • 4,721
  • 5
  • 26
  • 58
8
votes
2 answers

Redirect touch event on TextView with ClickableSpan to parent view

I have a RecyclerView with TextViews that could contain custom hashtags that should be clickable. So I have created subclass of TextView in which using Pattern I create ClickableSpan. In order for ClickableSpan to be active, I have added…
Viktor K
  • 2,063
  • 3
  • 22
  • 39
8
votes
1 answer

Textview`s LinkMovementMethod blocks listitem touch event

I have some problem with Listview. Listview has list items that consist of imageview and textview. Textview contains clickable links. When I set LinkMovementMethod to textviews, listitems doesn`t receive onclick event. I still cannot find any right…
salvicode
  • 217
  • 2
  • 11
7
votes
1 answer

Bold ClickableSpan on touch

I have a TextView in which every word is a ClickableSpan (actually a custom subclass of ClickableSpan). When a word is touched, it should be shown in bold font style. If I set textIsSelectable(false) on the TextView, it works just fine. The word is…
Matt Robertson
  • 2,283
  • 5
  • 23
  • 51
6
votes
2 answers

How to catch an Exception (ActivityNotFoundException) while using LinkMovementMethod

I have currently a TextView with some HTML phone numbers and url. I have noticed that we can use the setMovementMethod to make these links clickable: tv.setText("Phone number is: +32485123456 and url is…
Waza_Be
  • 39,545
  • 47
  • 176
  • 256
5
votes
2 answers

EditTexts with links both clickable and editable

I am working with EditText which take WebUrl in input.For that I am using LinkMovementMethod Make links in the EditText clickable. Problem is that : If the last part of the text is a link, clicking anywhere causes the link to be opened. I want…
pRaNaY
  • 21,330
  • 22
  • 85
  • 134
5
votes
5 answers

Android TextView leaks with setMovementMethod

I have a ListView and in it's adapter's getView method, I return a RelativeLayout with MyButton inside it. MyButton has a textView and I have clickable words inside it (ClickableSpan). To make this work, I start with thew following…
frankish
  • 6,347
  • 5
  • 43
  • 93
4
votes
1 answer

LinkMovementMethod not scrolling TextView

I have a TextView with clickable spannablestrings. I am calling textview.setMovementMethod(LinkMovementMethod.getInstance()); I am able to click individual words but the TextView does not scroll. This is the TextView…
Matt Robertson
  • 2,283
  • 5
  • 23
  • 51
2
votes
0 answers

override LinkMovementMethod textview android

I need to override default LinkMovementMethod. But it's calling the default LinkMovementMethod. Here is the code: class MovementCheck extends LinkMovementMethod { @Override public boolean onTouchEvent(TextView widget, Spannable…
Shubham
  • 2,753
  • 3
  • 27
  • 44
2
votes
1 answer

TextView#setMovementMethod(LinkMovementMethod.getInstance()) is breaking link display

I have a TextView that I am populating with a Spannable made from some HTML. This code: textView.setText(Html.fromHtml(textContent, mImageGetter, null)); displays links, but they aren't clickable. This…
Andrew Wyld
  • 6,923
  • 6
  • 49
  • 95
1
vote
1 answer

Movement of Object in a game in C++

So I am making a game for a school project. You might be familiar with this one. Its Arkanoid, or the game in which a ball is used to destroy bricks and is deflected on by a platform. Currently I am stuck at a point. I have got an idea of how to…
1
vote
1 answer

LinkMovementMethod does not scroll if you start dragging from the link region

LinkMovementMethod class, which helps to find, highlight and handle clicks on links inside the TextView, has the issue with processing onTouch() method - if you start dragging from the detected link, you will see that no scrolling will occur.
1
vote
1 answer

Intercept link LinkMovementMethod with a Yes/No dialog

I have a standard LinkMovementMethod established in my TextView to push a web Activity of some sort when the user touches a link. However, I want to establish a "do you want to see the link" dialog rather than taking the user straight to the…
QED
  • 9,439
  • 6
  • 46
  • 82
1
vote
0 answers

long Textview flickers when using linkify

I am using linkify to make links clickable in the textview. But whenever text length is big, the text flickers on scrolling or sometimes just disappears. The text view is part of header of recyclerview. Posting relevant code from activity class, its…
1
vote
0 answers

Using LinkMovementMethod and Native copy/paste in Textview - Android

I have a TextView with html text and I need native copy/paste and clickable links. I have used the next code, but when I use setMovementMethod(LinkMovementMethod.getInstance()); the native copy/paste stops to work. If I change…
Luiz Alves
  • 1,927
  • 2
  • 19
  • 48
1
2