Questions tagged [textview]

Text View is an UI element that allows users to view and/or modify the displayed text. Use this tag for programming questions related text views, and add the relevant programming language or technology tag to get more exposure for your question. General UX questions regarding where to place a text view, and other similar opinion based questions are not on topic for Stack Overflow.

14126 questions
4
votes
5 answers

Change EditText Cursor color through styles.xml

Right now, I can change the cursor drawable through reflection and using property android:textCursorDrawable. I looked at the TextView code, and its actually reading the drawables from Resources.Theme. I'm wondering if its possible and how to change…
Siva
  • 355
  • 1
  • 6
  • 19
4
votes
1 answer

How to enable the Translate contextual menu in my edittext?

On marshmallow their is now a contextual menu "translate" when we select some text : The problem, i don't know why, i can't see this option in my application when i select text in my textview. What i need to do to activate it ?
zeus
  • 12,173
  • 9
  • 63
  • 184
4
votes
2 answers

ValueAnimator for count up effect on Android TextView

I am trying to make a cout-up effect in a TextView for a double value like this: ValueAnimator animator = new ValueAnimator(); animator.setObjectValues(0, 50.5); //double value animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()…
user5864372
4
votes
1 answer

Custom android square textview text is not centered

I am trying to create a textview that will always be squared so I have implemented this custom class. public class SquareTextView extends TextView { public SquareTextView(Context context) { super(context); } public…
Danjoa
  • 143
  • 4
  • 14
4
votes
2 answers

Word has not enough space in single line

I have an TextView with a big fontsize and if I have a long word only the last char is put into the next line. For example : Zusammenarbei t Now I would like to format the text to look like this: Zusammenarb - t Is there a possibility to achive…
4
votes
5 answers

How to capitalize the first letter in custom textview?

In Custom TextView suppose if first character as a number then next character would be a character. How to find the first character amoung numbers.
Dhivyaseetha_Kumba
  • 164
  • 1
  • 1
  • 7
4
votes
2 answers

Having a view wrap around another view

Is there a way to make my textview wrap around other views? For example in the picture, is there a way to get it to wrap to the edge once it gets below the imageview? This is my xml
Falmarri
  • 47,727
  • 41
  • 151
  • 191
4
votes
2 answers

SQLite Database issue in TextView

I've been working on an app where the main Activity leads to CalendarActivity, which has a button leading to another Activity where the user creates an event. Once the event is created, the user is taken back to CalendarActivity, and a previously…
snzy
  • 53
  • 8
4
votes
4 answers

How to create TextView that will act as a link

I have a Textview with location: eg. "Mountain View, CA" What I want to achieve is to create this text to act like a Link - color,underline, focusability etc. This link doesn't need to direct anywhere - surrounding view has attached onClick listener…
pixel
  • 24,905
  • 36
  • 149
  • 251
4
votes
1 answer

Textview width doens't adjust after change content

I'm trying to update the content of a TextView with the data introduced by an EditText. But after change the text, if the original text (hint) was bigger than the new text, the width doens't change. I have the next string in the Hint Attribute of…
Víctor Martín
  • 3,352
  • 7
  • 48
  • 94
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,928
  • 5
  • 34
  • 62
4
votes
3 answers

Display images on Android using TextView and Html.ImageGetter asynchronously?

I want to set a TextView with SpannableString which is from the method below: Html.fromHtml(String source, Html.ImageGetter imageGetter, Html.TagHandler tagHandler) But the ImageGetter here need to override the method below: public abstract…
shiami
  • 7,174
  • 16
  • 53
  • 68
4
votes
3 answers

How to change the ellipsis string of Android TextView?(... to ...more)

I want to change the ellipsis string from ... to custom string, such as ...[more]. But in TextUtil, the ellipsis string is fixed: private static final String ELLIPSIS_STRING = new String(ELLIPSIS_NORMAL); Then how to change the ellipses?
Neo lee
  • 71
  • 1
  • 6
4
votes
1 answer

Keeping text view above the keyboard as it is edited

I have a text view with a dynamic height. As the user adds or removes text the height of the text view changes. My issue is that as the user adds text and the text view grows it disappears behind the keyboard. I have successfully moved the view…
01Riv
  • 1,444
  • 1
  • 13
  • 28
4
votes
5 answers

setOnClickListener on a TextView inside a Cardview

I'm having some trouble implementing a setOnClickListener on a TextView inside a Cardview.I use this Cardview to populate a recicleview. I have tried setting up the listener in the onBindViewHolder,but i can't see the log. Single Item
user6340185
1 2 3
99
100