Comments (28)
I see this is based on valued calculations, right now which might be causing this issue, I am not sure if I have the time right now to do the math and do this on a percentage basis but I will try whenever I get a chance, if possible for you can you take an initial look into this and just pin point where this stems from and I can do the rest.
It is okay if you can't by the way i will try to fix this whenever I have the time
from maui.freakycontrols.
Sure. I'll take a look and see if i can spot the class/method that handles the resizing and positioning of the title text.
from maui.freakycontrols.
Looks like it is doing this in MAUI.FreakyControls/Shared/FreakyTextInputLayout/FreakyTextInputLayout.xaml.cs
These values are hardcoded so probably needs to be dynamically calculated based on the entry fontsize:
private int _placeholderFontSize = 18;
private int _titleFontSize = 14;
I see a couple methods that appear to be doing calculations:
TransitionToTitle
TransitionToPlaceholder
Each of these 2 methods appear to call SizeTo which also handles some of the translation as well.
Anyway, i hope that helps point you in the right direction.
from maui.freakycontrols.
@sk1llsh0t Yeah, I need to do that, initially, I just did it based on the available font sizes in XF and then just used them as is in MAUI, I will try and put in some time and calculate things manually, I will try my best!
I honestly never thought this control would get so popular and get used by so many people
from maui.freakycontrols.
What may be easier is leave the logic as is for default behavior. But add 2 new bindable properties for placeholderfontsize and titlefontsize. Then you can just do the translation to those 2 values rather than trying to do the complicated calculations. Let the dev decide what he wants the sizes to be and it frees you from having to figure out the complicated logic.
Only thing I guess you'd have to figure out is placement of the title label to make sure it is positioned correctly at the top.
from maui.freakycontrols.
Even with the placement of the label, you could add a titlemargin bindable property so it can be tweaked if it isn't positioned quite right
from maui.freakycontrols.
Yeah I will have to make sure that somehow the title always lands correctly which is gonna be a hassle, may be I'll figure something out, if you have some time I'd really appreciate if you could also try this out maybe tweek it a bit and see if it does something cuz right now I'm a bit occupied with something else
from maui.freakycontrols.
Even with the placement of the label, you could add a titlemargin bindable property so it can be tweaked if it isn't positioned quite right
Not gonna lie that makes sense but then, it will give some Dev's too much control and they might start messing around and raise bugs because they don't understand
from maui.freakycontrols.
I got the calculations figured out and it is working well. when i get a chance, i'll send the changes so you can play with it/test it out and make whatever tweaks/code cleanup you want to.
from maui.freakycontrols.
I was also able to fix some overrlapping issues with the placeholder and the image as well as fix the full bordertype so the floating label doesn't overlap other controls around it.
from maui.freakycontrols.
Oh wow that's great, please raise a PR on develop if you would like
from maui.freakycontrols.
Also, I am gonna start working on this hopefully in this PR: #122
So if you do have any breakthroughs I would love to see them, I am in any case looking into some things in the controls anyway
from maui.freakycontrols.
I have created a new branch with my changes but i don't have permissions to push my branch up.
from maui.freakycontrols.
You need to do this by forking, the library and then making the changes on your personal fork and once you do that you can push that fork and create a PR
from maui.freakycontrols.
yep. sorry. done.
from maui.freakycontrols.
Don't be sorry bro, you are doing some work you don't need to and I appreciate the time you are putting in 😅
from maui.freakycontrols.
I've tested pretty thoroughly with an android device and the changes are to my satisfaction. I don't have any ios device to test with if you could test that out and make any tweaks necessary. Also it couldn't hurt to do testing yourself to make sure it looks fine to you as well.
from maui.freakycontrols.
It appears from what I can gather that the TextInputLayouts control on iOS (iPhone 15 Pro Max simulator running iOS 17.5.1) is broken in master. An error occurs when tapping the entry and it calls the focus event. It calls the animate callback routine once and then crashes.
from maui.freakycontrols.
Oh that's interesting, Is this the code in master that you have changed or is it the current code in master?
from maui.freakycontrols.
I ran the current code in master b/c i wanted to see if it was something I had changed that broke something.
from maui.freakycontrols.
I will check this when i am a bit free, Don't worry I will see what is wrong
from maui.freakycontrols.
It appears from what I can gather that the TextInputLayouts control on iOS (iPhone 15 Pro Max simulator running iOS 17.5.1) is broken in master. An error occurs when tapping the entry and it calls the focus event. It calls the animate callback routine once and then crashes.
I just tested this, multiple times and I am not facing this issue, but I am running a simulator that has iOS 17.2 running on it, so may be that is the reason it's not crashing, Also is Xcode 15.3 compatible, I am still using 15.2. A stack trace for this would be nice to have!
from maui.freakycontrols.
I also merged and tested your changes on iOS they look amazing, you pretty much completed this on your own, Thanks man, It just needs minor tweaks, which i will do in sometime, but I will probably release this over the weekend hope this is ok with you
from maui.freakycontrols.
Sweet! Looking forward to the release this weekend. I'm not an ios developer so it could be my environment isn't setup right regarding the issue I encountered. Anyway glad I was able to help!
from maui.freakycontrols.
fixed in the latest pre-release
from maui.freakycontrols.
@sk1llsh0t Could you take a look at this, its seems to be relevant to our change here #135
from maui.freakycontrols.
I can take a look when i get a chance. It probably has to do with the default values not getting applied correctly to the hidden title label for animation calculation. if no value is specified, it may be that the font size isn't getting set correctly on that label and it isn't calculating the animation.
from maui.freakycontrols.
@sk1llsh0t no worries brother take your time
from maui.freakycontrols.
Related Issues (20)
- Help needed to run sample HOT 3
- FreakyTextInputLayout with maui toolkit validation HOT 6
- Svg text font HOT 3
- Cancel Button and OnKeyboardClicked Events HOT 13
- FreakyPinCodeControl sizing keyboardbuttons HOT 9
- Handler not found for view Maui.FreakyControls.FreakyAutoCompleteView. HOT 5
- Features for the cancel button HOT 5
- [0.4.12-pre] SKCanvasView Compile error HOT 8
- FreakySwitch does not have the default switch animation HOT 1
- Platform view cannot be null HOT 8
- PinCodeControl with scrollview HOT 8
- iOS simulator build fails HOT 8
- FreakyTextInputLayout setting default text breaks the title animation HOT 3
- It would be nice to be able to change the width of the FreakyAutoCompleteView list once it is displayed without needing to change the width of the control HOT 2
- FreakyAutoCompleteView improvements for text styles HOT 4
- SkiaShap needs to be updated due to a well documented Vulnerability HOT 6
- HandlerNotFoundException while debugging in Windows Machine mode
- AutoComplete control freezes the app
- Leak Proof Controls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maui.freakycontrols.