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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

Applying a custom view to textview background in android

I have created a toolTip shape-like view , basically i want to set this view as backgound to my textview in android but for some reason it shows as cut-off from bottom and not showing fully , anyone's ...
Taki's user avatar
  • 3,302
0 votes
0 answers
10 views

I have a custom text view. I have given the code, is the library used in it, how to do it?

<com.framework.customViews.CustomTextView android:id="@id/tvTitle" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/...
Raushan Kumar's user avatar
0 votes
0 answers
18 views

Add word wrap to Android TextView inside Flow widget

Is there a way to make TextView perform a word wrap in case attached below? Word "Sauces" and a comma of TextView "Sauces, Spices" should stay in the first line if word wrap is ...
horvoje's user avatar
  • 643
0 votes
0 answers
18 views

Can I select the text of a TextView from a function call to display an ActionMenu

I have confirmed that I can select TextView in Android from a function call to Text. However, the ActionMenu (including textSelectHandle) does not appear at this time. In other apps, I am able to ...
tmyk110's user avatar
0 votes
0 answers
16 views

How to use fontFeatureSettings and spanned string in the same Android TextView?

I'm trying to display some text in compose that contains some html tags that should be applied. e.g. This is a string with <b>bold</b> and <i>italics</i><br><br>...
Matt Smith's user avatar
0 votes
2 answers
28 views

How to place an icon just after the last character of a multiline textview

I would like to locate a view just after the last word of a (potentially) multi-line TextView. For example, the TextView might be two lines, with the second line being about half as long as the ...
Shivam Gupta's user avatar
1 vote
0 answers
30 views

Disable 'Open link' from clipboard in Swift

I need to disable url selection from my text view. I have set the data detector property to an empty array and set func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: ...
user1749073's user avatar
0 votes
0 answers
7 views

Why am unable to take the test in editText using the getText().toString()

Unable to get the Text in the editText I tried to get the Text in editText once the user Clicks the button and I tried to set that text into a TextView..but after entering the input when the user ...
Ponraj S's user avatar
0 votes
0 answers
23 views

View will automatically move down while textview overlapping on a view

I want to create a chat bubbles like whatsapp. The problem is that constraints not working stable on code side. I have used onGlobalLayoutListener but in recyclerview view is changing when user ...
user3581189's user avatar
0 votes
0 answers
16 views

Absolute position TextView inside a FlexBox Android

I want to position a TextView centered horizontally from his parent but I don't want the parent to get the width of this TextView. I also want that TextView to grow outside the parent width if it's ...
Felix-Etienne Gauthier's user avatar
0 votes
0 answers
23 views

android studio responsive textView,ImageView and Text

I have ImageView and TextViews in my game. I put TextView in ImageView and translate text to all languages. I ran into a problem. TextViews overflow from ImageViews, how can I make it suitable for all ...
Twitch Arşivim's user avatar
0 votes
1 answer
32 views

TextView changes in Log.d, but doesn't change in actual application

I have a navigation_header.xml where I have two TextView: one if ID navigationUserName and the other with ID navigationUserEmail. These TextView have placeholder values: John Doe and JohnDoe@gmail.com ...
Jaime Miranda Ramirez's user avatar
0 votes
0 answers
6 views

(need help) score not showing in text view , (need help) score is not showing in text view, here is my java code

private void checkForMatchingImages() { int currentImage = images.get(0); int sameImageCount = 1; for (int i = 1; i < imageViews.size(); i++) { if (images.get(i) == ...
roy maulana's user avatar
0 votes
0 answers
25 views

How to make Android's ellipsizing more "even" with multiple TextViews?

I have two TextViews in a TableLayout. Both have android:ellipsize="end" and are in android:shrinkColumns. The goal is that if there is enough space, both TextViews will be shown in full (...
TheBrokenRail's user avatar
0 votes
0 answers
33 views

Text view running on from previous Text view

I'm trying to create a text reader that lets you tap on a sentence to highlight just the sentence. I want each array of a string to be able to run on from the end of the previous sentence, but I am ...
tryingtocode's user avatar
-4 votes
1 answer
39 views

Creating a random numbers and generating an array to pass to the next activity

I have created a code for random numbers to show each number in editText. Im now trying to populate each number to an array and pass it to the next activity. When I do so, my app does not compile. ...
Phumzile Macu's user avatar
0 votes
0 answers
12 views

Some elements in view binding cannot be resolved

I have this code in android studio, who put some TextView elements from a xml in a table, but for some of them, the reference is not detected, so i'm obligated to use findViewById private ...
Julien Lamhene's user avatar
0 votes
1 answer
33 views

Appending text to textview

There's a button with the following onClick event: fun add(view: View) { txt.append((view as Button).text) } But I get an error on using += operator. fun add(view: View) { txt.text += (view ...
Shub's user avatar
  • 374
1 vote
0 answers
46 views

Android Studio int pass to textview

I want to show the score at the end of the section with a textview in the AlertDialog. I tried everything but couldn't do it. public class Main2Activity extends AppCompatActivity { int score; ...
Twitch Arşivim's user avatar
0 votes
0 answers
4 views

Load in a textView the data of a variable after performing a mathematical operation

I have a recyclerview with a cardView, which I load without problem from firebase, then I go through it with a for loop to perform a check and a calculation, the result of that operation is stored in ...
fjblancom's user avatar
0 votes
0 answers
22 views

How to pass single data API data textview

I tried it. I don't see any data. If you find any errors in these please let me know.The data is coming to me from the rest API public class newsfeed implements Serializable { public int cid = -1; ...
jay raman's user avatar
0 votes
0 answers
6 views

How to update a text view in the one position of the viewpager

I am using a viewpager to load the pages with multiple text views. Based on some conditions I have update the text view in the current position of the view pager. How do I do this without having to ...
Nikitha's user avatar
  • 49
0 votes
1 answer
40 views

Android TextView partly gradient

Android TextView partly gradient, such as: "hello android hello kotlin", I want "kotlin" gradient, how can I do?
LloydFinch's user avatar
0 votes
2 answers
33 views

Android Java throws unusual error when passing int value to the setText() method of TextView

I'm trying to create a Android project. I have this XML layout code: <TextView android:id="@+id/music_duration_text_view" android:layout_width="...
user avatar
0 votes
0 answers
15 views

Custom function to show subtitles in android VideoPlayer using textview by reading subtitle content from (.vtt) files when clicked on CC button

If the subtitle file contains human errors and different data formats this function will be helpful i guess. Call it in the CASE where rendering of the video starts case MediaPlayer....
Ajj's user avatar
  • 1
0 votes
0 answers
15 views

Summing up the scores in the Android Studio text view

How do I add the score in DisplayScore text view to the Totalpoint text view score? I've tried and searched many times, but I haven't found an answer at all. Somebody help me' private String point; ...
LS PlayQ's user avatar
0 votes
0 answers
27 views

How to make marquee text without stopping programmatically- Android Java

I would like to ask how to make a marquee text without stopping when reaching the beginning programmaticaly. Currently I have the plain TextView made programmatically as marquee: textview47....
bilykralik16's user avatar
0 votes
1 answer
41 views

Kotlin-Android First App TextView Button app crashed after clicking button

I am new to android studio, just installed and my first app crashed after clicking the button I added some imports but didnt work. Can anybody help ? I installed the lastest ver of andriod studio ...
Ferhat Aytug's user avatar
0 votes
1 answer
26 views

How to Retrive Firebase key value based on spinner selection

I have a set of course details stored in the firebase Realtime Database. I have retrieved the course names into a spinner for user selection of a particular course. I wanted to get the key (course ...
Thadhasneem Nooriya's user avatar
0 votes
0 answers
37 views

How to add margin/padding to ImageSpan in the SpannableStringBuilder?

I'm trying to create a custom TextView by inheriting AppCompatTextView and giving the option to add an icon after the text. Here's my class: class IconTextView(context: Context) : AppCompatTextView(...
Renegade's user avatar
  • 652
0 votes
0 answers
7 views

Display the address of the web view in the text view

I want to create an application that shows my website page in the webview and everything works correctly. But my problem is that I want the new site address to be displayed in the TextView when I ...
Matin Javid's user avatar
0 votes
1 answer
18 views

Display the website address as text in the toolbar

I am developing a webview application. When the webview opens a page, I want to display its URL in the toolbar as a text view. But I don't know, please help me... enter image description here Show ...
Matin Javid's user avatar
0 votes
0 answers
13 views

TextView does not appear when put it between two vertical guidelines in constraintLayout, Android Studio, Java

When I put a TextView, make the top constraint on the parent, and its left and right constraints on two vertical guidelines, and then run the app, the textview disappears I tried to restart the app, ...
Hassan Amer 's user avatar
0 votes
0 answers
23 views

CustomView style not applied to programmatically added TextView in android

I have a custom view for creating a button and applied a style for it. I am adding label to the button by creating TextView programmatically in the custom View class. Below is the style which I ...
visakh r's user avatar
  • 175
0 votes
1 answer
25 views

How do I use RecyclerView with an array of TextViews inside a fragment?

I am new to Kotlin and started coding a few years ago. I am trying to make a calorie counter application, but I am stuck at adding the food and calories in the first place. I think the issue is that I ...
Wzyl's user avatar
  • 7
0 votes
0 answers
104 views

Unable to Set Emoji Art to Clipboard Properly

I have made an app on ASCII Art. Now, I am in the process of incorporating Emoji Art into the app. While the functionality for setting ASCII text in the clipboard works seamlessly, I have encountered ...
Vasant Raval's user avatar
-1 votes
1 answer
57 views

Cannot resolve class TextView

I am a complete newbie on Android Studio, and I'm trying to code some things, but I'm still blocked by a simple thing : in an xml file, I have this : (https://i.stack.imgur.com/rKhO6.png) I still can'...
Alex Vils's user avatar
0 votes
1 answer
35 views

How to expand a text after clicking switch widget in android kotlin

I want my switch to open or expand a text field when checked on, or to minimize the text field when checked off. I can't help my self and find it on the internet. I managed to make a button that opens ...
the tiffie's user avatar
0 votes
0 answers
22 views

zoom TextView String( html string) which contains string and image both?

I have html String which contain text and image both and i am rendering it on TextView and it working fine here is the example HTML String <span style="font-family:;">What is the ...
Android dev's user avatar
0 votes
0 answers
29 views

Make text (TextView) and Icon center in SpannableString

I've created a SpannableString with an icon in the middle. And it looks like this As you can see here, the text is not aligned with the icon's center. I've tried adding ImageSpan.ALIGN_BASELINE but ...
Sourav's user avatar
  • 312
0 votes
0 answers
10 views

Measure text in canvas with stroke - Android

I'm trying to make a custom textview and I'm struggling to measure my stroked text. I know that a text size can be easily determined using TEXT_PAINT.getTextBounds(text, 0, text.length(), bounds); ...
Josemafuen's user avatar
0 votes
0 answers
18 views

Why "\n" does not work in TextView for strings obtained from API in Android Kotlin?

I have a string which I obtained the value from API. String has \n to make TextView multine. But it does not work. For example; The string is "Stack \nOverFlow". Expected result: Stack ...
hgokumus35's user avatar
0 votes
1 answer
55 views

Android: ConstraintLayout, expected behavior upon setting visibility to Invisible for one of the views

I have ConstraintLayout with 3 textViews and an imageView in it. And this is the recycler view item. First textView's top and left constraints are set to parent. Height and width are set to ...
oop's user avatar
  • 124
0 votes
2 answers
42 views

Changing Text color of selected item in RecyclerView OnClick

I want to change the text color of the only selected view in my recycler view. The code below works by changing the background color but I also need to change the text color of the selected item. The ...
jiija's user avatar
  • 1
0 votes
1 answer
49 views

Unwanted top margin on TextView with horizontal linear layout

Can Somebody explain why there is a margin above the textview with this layout? This seems like a bug to me. I can not find a way to remove this so that the TextView and Button start at the same ...
save_jeff's user avatar
  • 403
0 votes
0 answers
48 views

How to show function results as text on screen

I'm trying to make a random generator app for streamlining random quests in a tabletop game. The goal is to hit the generate button and have the results shown in the textview on activity page as a ...
jack kelley's user avatar
0 votes
1 answer
48 views

TextView with outline in Android

I want to have a textview with a double stroke in Android, which is not natively supported (not even a single stroke). Following Android textview outline text it can be easily achieved. public class ...
Josemafuen's user avatar
1 vote
1 answer
98 views

Kotlin -How to Change Text Color of a SpannableString with an Image

I have a string with an image on the back. I'm able to change the image color to green but I can't get the text color to change to green also. It stays black. "abc is available" should be ...
Lance Samaria's user avatar
0 votes
2 answers
34 views

How to adjust text in textview next line for long text in android

<androidx.cardview.widget.CardView android:id="@+id/card_r2_4k" android:layout_width="match_parent" android:layout_height="wrap_content&...
MARSH's user avatar
  • 105
0 votes
1 answer
34 views

How to create glow effect for textview

I have an application written in kotlin, in my app have function add the desired user text line. Adding text is relatively easy, but I was asked to add effects to the text. Anyone with any ideas ...
ninh312's user avatar
  • 39

1
2 3 4 5
283