Category "textview"

justificationMode with LinkMovementMethod make text cut off

I want to achieve both justify text and add a link (show more) to TextView so I use justificationMode with movementMethod. justificationMode working well but af

How can I get new entered value on EditText with TextWatcher

I can get the old value. But I do not have a solution to get a new entered value. In fact, I want to separate the old value from the new value. For example: I

Kotlin textview to scroll in both directions

I'm trying to setup a textView in Kotlin to scroll in both directions (ie horizontal and vertical). That is, I want long lines to run off the right side, and us

Change position of icon drawable in TextView

In my case, I have a textView with a drawable icon at the start of it(android:drawableStart), when the text of textView is multi-line, the icon goes in the vert

Wear-OS Tiles and marquee_forever

How would one go about adding the attributes like the below to a text component in a Wear-OS Tile android:marqueeRepeatLimit="marquee_forever" android:ellipsize

Print Textviews and webview from fragment

I'm using such code for creating pdf from webview PrintManager printManager = (PrintManager) this .getSystemService(Context.PRINT_SERVICE); Pri

How do I make my Android app prefix each displayed line of text with ">"?

My app displays a long line of text like this: I want to add a ">" character to each line, so I tried the following code: private String addPrefixChars(Stri

Swift UI: Center Text into Circle

I try to put a circle-shaped frame around a text view, but I just can't get it properly aligned and I can't see where the problem is. As you can see in the pict

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 St

Why don't my multiline textviews have the same height?

I have 3 textviews with 2 lines. I placed them in the horizontal LinearLayout with same weight. The problem is that when I put text into this TextViews, they ha

Resource String Color not working programmatically in Android

string.xml Here is my string <string name="bullet_text"><font color="#38d98a">●</font>\t\tCucumber Detox Water (1 glass)\n<font color

How to display each clicked words from TextView

I am planned to develop an App with very simple concept.The requirement is I want to add a text file from phone(Dynamic, so set span with clickabble position no

Kotlin-Android First App Unresolved Reference TextView Button etc

I'm new to Android & Kotlin development. I wanted to get started with a simple "Hello World", but am already running into problems. I added a Textview to

Android: set just one padding of textview programmatically

I want to set the top padding of a textview programmatically. I know you can do this with the method setPadding(). But the problem is that this method requires

Android TextView with Clickable Links: how to capture clicks?

I have a TextView which is rendering basic HTML, containing 2+ links. I need to capture clicks on the links and open the links -- in my own internal WebView (no

Dynamic height of TextView within a GridLayout

I have a problem using GridLayout using library compatibility (not tried without). I am using app:layout_gravity="fill_horizontal" instead of android:layout_gra

The specified child already has a parent. You must call removeView() on the child's parent first (Android)

I have to switch between two layouts frequently. The error is happening in the layout posted below. When my layout is called the first time, there doesn't occu

How to draw rounded rectangle in Android UI?

I need to draw a rounded rectangle in the Android UI. Having the same rounded rectangle for TextView and EditText would also be helpful.

Set color of TextView span in Android

Is it possible to set the color of just span of text in a TextView? I would like to do something similar to the Twitter app, in which a part of the text is blu