Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Autosize Label TextCompat pre android 8 doesn't autosize text #241

Open
AdamDiament opened this issue Jul 12, 2020 · 0 comments
Open

Autosize Label TextCompat pre android 8 doesn't autosize text #241

AdamDiament opened this issue Jul 12, 2020 · 0 comments

Comments

@AdamDiament
Copy link

Xamarin.Android Version (eg: 6.0):

7 and below have the issue. 8+ works as expected.

Operating System & Version (eg: Mac OSX 10.11):

Windows 10

Support Libraries Version (eg: 23.3.0):

using Android.Support.V4.Widget.TextViewCompat; (nuget package for compat not explicitly installed. I tried installing both v4 and v7 and it made no difference)

Describe your Issue:

TextViewCompat.SetAutoSizeTextTypeUniformWithConfiguration does not work as expected on android pre-8, when used in a custom renderer in a xamarin forms project. According to the docs it should provide backwards compatibility to android 4+. Font size should shrink as to not overflow the text bounds, it doesn't.

Steps to Reproduce (with link to sample solution if possible):

Sample solution zip: (rebuild as bin/obj folders were deleted).
TestAutoSizeTextView.zip

  1. Rebuild the project and start on an Android 8 or higher device. The page loads and you see this screen with the text resizing correctly in the three labels with Aqua backgrounds.

image

  1. Load the same project on an android 7 device. The following behaviour is seen, text doesn't resize as expected.

image

Include any relevant Exception Stack traces, build logs, adb logs:

N/A

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant