android-autofittextview icon indicating copy to clipboard operation
android-autofittextview copied to clipboard

how to get origin text size

Open walterFeng opened this issue 7 years ago • 2 comments

getTextSize() return max value of textSize, how to get current text size?

walterFeng avatar Aug 01 '18 12:08 walterFeng

Hey @walterFeng not sure if you are aware that the standard Android TextView now supports 'auto size' text out-of-the-box see here. It may return the correct size :)

sjaramillo10 avatar Aug 01 '18 13:08 sjaramillo10

thanks @sjaramillo10 . but in Autosizing TextViews, the text box is the specified height not width:

<TextView
    android:layout_width="match_parent"
    android:layout_height="200dp"
    android:autoSizeTextType="uniform" />

it is not working:

<TextView
    android:layout_width="200dp"
    android:layout_height="wrap_content"
    android:autoSizeTextType="uniform" />

walterFeng avatar Aug 01 '18 15:08 walterFeng