material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[TextInputLayout] Hint text overlaps outline

Open ivan200 opened this issue 3 years ago • 4 comments

Description: outlinedbox crossed hint on android 4 screenshot

Expected behavior: Hint is displayed without overlapping with the box.

Source code: https://github.com/ivan200/Overlap

just simple app with Theme.Material3.Light theme

Minimal sample app repro: Create new emulator -> Nexus 4 -> x86 Images -> Api 16 (without google api), run app (my emulator settings here )

Android API version: 16

Material Library version: com.google.android.material:material:1.6.1

Device: Emulator api 16

ps. also, TextInputLayout somehow ignores my set margins?

pps. if i just add marginstart and marginend (32dp) to TextInputEditText in this sample app, it also broke hint on Android 6 (Pixel2_api23 Emulator)

ivan200 avatar Jul 11 '22 22:07 ivan200

Does this happen on a real device (with API 16) as well?

drchen avatar Jul 26 '22 21:07 drchen

sorry i have only device with android 4.3 (api 18) and hint there fine

tested on different emulators: api 15 broken line, broken margin api 16 broken line, broken margin api 17 broken line api 18 all fine

in manifest of this lib android:minSdkVersion="14"

so, i think bug is still there

ivan200 avatar Jul 28 '22 19:07 ivan200

@drchen Yes, it is happened on devices also (Android 4.0.3 here) Photo

ivan200 avatar Jul 30 '22 12:07 ivan200

Great thank you so much for helping spot the issue! : )

Will try to find some time to work on this.

drchen avatar Aug 01 '22 14:08 drchen

Any progress on this? The bug is still present in 1.8.0-alpha01.

henrik-lindqvist avatar Sep 30 '22 16:09 henrik-lindqvist

hey sorry I'm pretty occupied these days. Will try to find some time to fix this before 1.8 is released.

drchen avatar Sep 30 '22 16:09 drchen

@drchen Can the issue be worked around somehow, without patching the source code?

henrik-lindqvist avatar Sep 30 '22 16:09 henrik-lindqvist

I can't think of a good way to do that. It's deep into the background drawable drawing logic....

drchen avatar Sep 30 '22 17:09 drchen

@drchen Feared as much, guess i can't upgrade to higher than 1.4.0, as it seems the bug snuck in way back in 1.5.0.

henrik-lindqvist avatar Sep 30 '22 17:09 henrik-lindqvist

yeah I'm sorry for that we didn't notice the issue on lower APIs sooner. It's somehow not uncovered by our screenshot tests. : (

drchen avatar Sep 30 '22 17:09 drchen