Questions tagged [android-textview-autosize]

22 questions
13
votes
6 answers

Autosizing TextViews in RecyclerView causes text size to decrease

I am trying to use Autosizing TextViews in a RecyclerView, but when I scroll a few times the text gets so small that it's obviously not working properly. Example of my TextView:
HyperX
  • 926
  • 2
  • 16
  • 39
2
votes
0 answers

Make TextView adjustable with ellipsis at the end for the largest font size checked in Accessibility Settings

I've got TextView with description (anything from 1 line to 10+ lines) I want text to be clearly visible if I change font size Settings -> Accessibility -> Font Size to Largest I have some space, but not enough to display whole description I…
Przemo
  • 594
  • 5
  • 19
2
votes
2 answers

How to use TextViewCompat for text autosize below API 26?

I need to use autosizing in TextView below API 26, so I read this: https://developer.android.com/guide/topics/ui/look-and-feel/autosizing-textview The library provides support to Android 4.0 (API level 14) and higher. The android.support.v4.widget…
NullPointerException
  • 32,153
  • 66
  • 194
  • 346
1
vote
2 answers

AppCompatTextView autoSizeTextType not working

In my activity.xml, I have two AppCompatTextView that looks like this:
1
vote
1 answer

Calculate the size of the text based on the height of the TextView

I have a TextView within a HorizontalScrollView, as shown below. Currently, I am using a fixed text size. Now, I would like to calculate the maximum text size that I can use without the text size exceeding the height of the TextView. Note that the…
1
vote
2 answers

Add multiple TextView to View dinamically

I need to add indeterminate number of textview to a view, and I would love if it can be auto adjust to the screen. What I tried is to add horizontal LinearLayouts to a vertical parent LinearLayout, but this way I can add maybe 2 items or 3 per line…
Pablo R.
  • 639
  • 1
  • 8
  • 26
1
vote
0 answers

Autosizing TextView not working with text ellipsized and centered

I am using autosize textview with appcompat and I get an issue I don't know if you have ever faced off. If I have a Textview with maximum and minimum text sizes, fixed width and height, gravity to center, and, a text so long that it should be…
José Carlos
  • 604
  • 5
  • 16
1
vote
1 answer

Can't change text size programmatically when using autosizing

I have multiple TextViews that use app:autoSizeTextType="uniform" and what I want to do is check which of those have the smallest text size after auto resize and then set that size to all other TextViews. So I have method like this called from…
matip
  • 704
  • 1
  • 7
  • 22
1
vote
0 answers

android- smart textview - RTL for arabic/persion sentences and LTR for english sentences

I want to make my textView smart that it automatically change the text directon of the sentence to left to right for english sentences and right to left for arabic/persion sentences this is done in lots of applications like telegram . I'v tried to…
1
vote
1 answer

Android layout: how to better manage different screen sizes?

I work on an app that containing some error screen that basically share the same structure: a AppCompatImageView: it contains an image that represent the encountered error, this image can be in "full width" mode or not a TextView: it contains the…
0
votes
0 answers

TextView with autoSizeText wont work correctly when resizing multiple times

I'm having a hard time figuring out the problem with autoSizeText used in TextView. Info: I have an activity that will show app tips to the user. Tips will automatically change every n seconds. The problem I have is with TextView…
Miha M
  • 187
  • 1
  • 1
  • 11
0
votes
1 answer

Android TextView autosizing takes more space than regular TextView

I have this simple piece of code where I want the TextView Contents to be resized. On initial impression, the Text inside the TextView has the content shrunk, which is great, but upon enabling layout bounds I see that TextView with AutoSizing…
0
votes
0 answers

Auto text size on EmojiAppCompatTextView not working on Android Lollipop

As EmojiAppCompatTextView extends AppCompatTextView I assume the Autosizing should works on it too. It seems to work on Android Q, but not works on Android Lollipop, as you can see in those screenshots: Q Lollipop You can find the…
ademar111190
  • 13,115
  • 12
  • 74
  • 101
0
votes
1 answer

Text does not adapt to TextView

I need to insert a large text in a TextView, but when pasting the text it does not adapt to the size of the TextView, because it has exceeded the width of the TextView and the text is giant, how to fix this? Note: I need to correct it using the…
user12824598
0
votes
0 answers

how can I use maxWidth and minWidth or maxHeight and minHeight?

It's confusing that minWidth and maxWidth shows up in auto-completion but most of the time for me, one of them only shows up.
c-an
  • 2,036
  • 1
  • 17
  • 46
1
2