enisn / UraniumUI

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

Incorrect behavior of title in PickerField when first selecting an element on Android #790

Open AlexanderXII opened 1 month ago

AlexanderXII commented 1 month ago

Description

After updating UraniumUI.Material from version 2.9.1 to 2.10.0 and 2.10.1 for Android version in pickerField element, there is a problem:

This issue is observed in versions 2.10.0 and 2.10.1, while version 2.9.1 works correctly.

The tests were performed on Android OS version 13.0 API 33 and 10.0 API 29.

On iOS, the title works correctly on both the latest version 2.10.0 and 2.9.1.


An example of bad behavior

https://github.com/user-attachments/assets/b8d849de-abc6-4592-9a5b-a42f14617e9f


Steps to reproduce

  1. Create empty Net MAUI project (or use exsits)
  2. Add UraniumUI.Material 2.10.0 or 2.10.1 to project package to your project and make the necessary configuration to use UraniumUI.Material
  3. Add to MainPage.xaml this code:
    <material:PickerField Title="Monkeys">
    <material:PickerField.ItemsSource>
        <x:Array Type="{x:Type x:String}">
            <x:String>Baboon</x:String>
            <x:String>Capuchin Monkey</x:String>
            <x:String>Blue Monkey</x:String>
            <x:String>Squirrel Monkey</x:String>
            <x:String>Golden Lion Tamarin</x:String>
            <x:String>Howler Monkey</x:String>
            <x:String>Japanese Macaque</x:String>
        </x:Array>
    </material:PickerField.ItemsSource>
    </material:PickerField>
  4. Start debugging the project and select an item from the list
manhtong2311 commented 3 weeks ago

I have the same problem

JanvRuij commented 2 weeks ago

I am also having this problem.

ketakidevendra commented 1 week ago

@enisn Apart from problem in dropdown mentioned above, I also observed that after upgrading to 2.10.0 and later versions, in iOS title text is not moving up when text has some prefilled value. Text field is present in expander or in carousel view where textfield, when I expand control I see like in below image. image On setting focus on the field title tThis is only happening in iOS. This was working correctly before fix of - https://github.com/enisn/UraniumUI/pull/755

enisn commented 1 week ago

Hi, thanks for your effort to determine the problem, I was away for a while, so I couldn't pay attention on that. I'll work on this asap

ketakidevendra commented 1 week ago

Hi, thanks for your effort to determine the problem, I was away for a while, so I couldn't pay attention on that. I'll work on this asap

Thank you so much. I really appreciate your work and been extremely useful for us :)

windofny1 commented 4 days ago

@enisn Apart from problem in dropdown mentioned above, I also observed that after upgrading to 2.10.0 and later versions, in iOS title text is not moving up when text has some prefilled value. Text field is present in expander or in carousel view where textfield, when I expand control I see like in below image. image On setting focus on the field title tThis is only happening in iOS. This was working correctly before fix of - #755

I also have same problem in TextField and after some attempts of finding workarounds - find some, that works for me. I have a TextField with binding to model: at XAML part:

<material:TextField Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2"  Title="Server Address"  Text="{Binding RemoteHostConnectionSettingsModel.Host}" HorizontalOptions="FillAndExpand" Icon="{FontImageSource FontFamily=FARegular, Glyph={x:Static fa:Regular.AddressCard}}">
    <validation:RequiredValidation Message="..." />
</material:TextField>

at ViewModel (after page load it's values filled by not empty strings and overlapping occurs):

[ObservableProperty]
private RemoteHostConnectionSettingsModel remoteHostConnectionSettingsModel = new() { Host="" };

When remoteHostConnectionSettingsModel inits by empty values - a has overlapping Title and Text, but if change empty string value to, for example, space symbol, than bind to real values - it's works perfect without overlapping:

[ObservableProperty]
private RemoteHostConnectionSettingsModel remoteHostConnectionSettingsModel = new() { Host=" " };