0

I'm looking for an optimal way to resize wrapping text in a TextView so that it will fit within Width.

I am referring to this Thread: Here is official Android Dev page

The problem I have app:attributes does not work even though i added implementation in gradle file. Error: "Namespace 'app' is not bound"

Here are is XML code fragment

app:autoSizeMaxTextSize="50sp"
app:autoSizeMinTextSize="12sp"
app:autoSizeStepGranularity="2sp"
app:autoSizeTextType="uniform"

And here is my gradle file

implementation 'com.android.support:support-compat:28.0.0'
Ed Rantsan
  • 19
  • 5
  • 3
    Welcome to Stack Overflow, Ed Rantsan. Please, instead of adding a external links consider adding it in text format. It will make it easier for people to help you. For more information, please take a look at [How To Ask](https://stackoverflow.com/help/how-to-ask). – Igor Escodro Dec 10 '19 at 13:25
  • @IgorEscodro I have deleted images and replaced them with text. Thanks for a great tip. – Ed Rantsan Dec 10 '19 at 18:01

1 Answers1

2

You have to provide xmlns:app="http://schemas.android.com/apk/res-auto" in the Parent Layout. Then you can use the app:attributes. Refer this answer and first comment on the answer and Gradle file error shows clearly your using androidx and trying to import android version 28 library

Ashish
  • 6,005
  • 3
  • 17
  • 40
  • Thanks a lot. I was referring to this comment + answer but didn't know about this part `xmlns:app="http://schemas.android.com/apk/res-auto"` – Ed Rantsan Dec 10 '19 at 13:10