enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
1.19k stars 143 forks source link

Input field titles become misaligned when changing Android device's global font size when app is open. #716

Open codychaplin opened 4 months ago

codychaplin commented 4 months ago

On Android, if you have an app open that uses InputFields and you change the font size in Settings > Display > Display size and text, then navigate back to the app, the titles do not adjust properly. This only happens when the field has a value and the title has already moved to the top. Fully closing and re-opening the app fixes it, it just happen while the app is running.

Before: Screenshot_1721223425

After: Screenshot_1721223467

ketakidevendra commented 3 months ago

@enisn - Same is observed when there are 2 tabs on page. If Tab1 is open and I click on Tab2 and go back to Tab1. All text fields labels are going up.

enisn commented 3 months ago

@enisn - Same is observed when there are 2 tabs on page. If Tab1 is open and I click on Tab2 and go back to Tab1. All text fields labels are going up.

Do you mean this going up animation? textfield-animation

It happens because of technical limitations. It releases events when removed from layout and re-registers when it's visible again. Since the locations are set by an animation, they're re-animated when become visible. You can create another issue for this problem. Maybe I can handle page rendering and set label position without animating

ketakidevendra commented 3 months ago

@enisn - Yes exactly. I have created a new issue - https://github.com/enisn/UraniumUI/issues/738 Thank you very much for quick reply.

tkouba commented 6 days ago

I have similar problem with title align when title is changed from binding

<material:TextField Title="{Binding Label}" Text="{Binding Value}" />
<material:TextField Title="{Binding Label}" />

in code

int _index;
string[] _labels = { "Short", "Middle label", "Very long label text" };
void OnButtonClick(object obj)
{
    _index = (_index + 1) % _labels.Length;
    Label = _labels[_index];
}

changing Label from middle to long text image

and then changing from long to short image

it looks like align is one step behind