Maui.FreakyControls icon indicating copy to clipboard operation
Maui.FreakyControls copied to clipboard

FreakyPinCodeControl sizing keyboardbuttons

Open SE250880 opened this issue 1 year ago • 5 comments

Hello! I´m using your "FreakyPinCodeControl" in an iOS app. I don´t know how to change the size of the keyboardbuttons and how to reduce the space between them. Can you show me an example?

grafik

SE250880 avatar May 16 '24 10:05 SE250880

You have everything you need in the documentation, did you go through it?

https://github.com/FreakyAli/Maui.FreakyControls/wiki/FreakyPinCodeControl

FreakyAli avatar May 16 '24 13:05 FreakyAli

Yes, I did, but ItemSpacing and KeyboardSizeRequest have no Effect?

SE250880 avatar May 17 '24 05:05 SE250880

I just tried it out and it's not working, So I will try to see if I can find some time to fix this, But I am not 100% sure how soon I will look into it!

You can either wait or just copy the control to your app and make changes to it if this is urgent

FreakyAli avatar May 17 '24 17:05 FreakyAli

After looking into this further, I have rewritten the logic that controlled the keyboard & display of the buttons, now they will be evenly distributed based on the available space and will also fit the height available to the control, Also I have added two new properties that should let you control the HeightRequest and WidthRequest of the keyboard buttons if you are not happy with the existing logic changes and the SizeRequest property is now deprecated in favour of the new properties and will be removed in some future release.

Note: once you use these above-mentioned properties, the above-mentioned logic that decides the sizes of the buttons will get automatically disabled as it is part of a grid and the only way to enable it again would be to recreate the view.

More information here: https://github.com/FreakyAli/Maui.FreakyControls/pull/122/files

FreakyAli avatar May 21 '24 01:05 FreakyAli

Oh yeah FYI ItemSpacing is not for the keyboard but the pin code items, you should find a new property in the next release called KeyboardSpacing

FreakyAli avatar May 21 '24 01:05 FreakyAli

Ok thanks, I will try this when the next nugetversion is released.

SE250880 avatar May 22 '24 05:05 SE250880

Fixed in the latest pre-release

FreakyAli avatar May 24 '24 05:05 FreakyAli

Ok thanks a lot. Is there also a possibilty to hide the cancel button or to set the size of this button separately? Since I can only set one text size for the keyboard, it is difficult to find a suitable size that fits the numbers and the cancel text. It would also be nice if the cancel button could have no text but an icon instead

SE250880 avatar May 24 '24 07:05 SE250880

Is there also a possibility to hide the cancel button or to set the size of this button separately?

For now no, if this was something you needed you should've mentioned this in this or a separate bug.

Since I can only set one text size for the keyboard, it is difficult to find a suitable size that fits the numbers and the cancel text.

This is intentional for consistency.

it is difficult to find a suitable size that fits the numbers and the cancel text. It would also be nice if the cancel button could have no text but an icon instead

Raise a feature request and i might look into it

FreakyAli avatar May 24 '24 08:05 FreakyAli