Hey all just wanted to put this out to the community. I created a field a while back for my mobile applications that has a few unique behaviors.
1. It allows for rounded corners
2. The system doesn't autoselect the fields when you change cards on mobile causing your entire app to get pushed up
3. You can customize what filters to have on the field (example: email, numeric, letters only)
4. The color changes for when the field is highlighted
5. The size can readjust to the surrounding area when the user types meaning if the field has 1 line of text then it will be 40 px, but when the user enters more text and the field wraps, the size of the field extends to 80px rather than having it scroll. (On mobile there is almost no way to touch scroll a field so this avoids a pretty big problem.)
Anyways, play around with it, change the custom properties according to your wishes, and someone please turn this into a widget.
If not a widget builder then improve and give back to the community. Thanks.
-Will
Created a livecode field that works with Android and Mobile
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 212
- Joined: Fri Feb 01, 2013 1:31 am
- Contact:
Created a livecode field that works with Android and Mobile
- Attachments
-
- Perfect Field.zip
- (2.95 KiB) Downloaded 249 times
Re: Created a livecode field that works with Android and Mob
err... everything that you have outlined here, and an awful lot more, can be done with a 'native' field...
the properties associated with a native field :-
text, unicodeText,textColor,fontName, fontSize, textAlign, autofit, minimumFontSize, autoClear, clearButtonMode,borderStyle, editing, autoCapitalization, autoCorrection, manageReturnKey, keyboardStyle, keyboardType, returnKeyType, contentType, enabled, editable... dataDetectorTypes, selectedRange, contentRect, hSroll, vScroll, canBounce, scrollToTop, canCancelTouches, delayTouches, pagingEnabled, decelerationRate, indicatorStyle... the list goes on...
focus is determined using the action iphoneControlDo id, "focus" ....and in conjunction with using the messages that are sent, you can determine when the 'native' field should move when the keyboard appears
did they forget anything ?..
the properties associated with a native field :-
text, unicodeText,textColor,fontName, fontSize, textAlign, autofit, minimumFontSize, autoClear, clearButtonMode,borderStyle, editing, autoCapitalization, autoCorrection, manageReturnKey, keyboardStyle, keyboardType, returnKeyType, contentType, enabled, editable... dataDetectorTypes, selectedRange, contentRect, hSroll, vScroll, canBounce, scrollToTop, canCancelTouches, delayTouches, pagingEnabled, decelerationRate, indicatorStyle... the list goes on...
focus is determined using the action iphoneControlDo id, "focus" ....and in conjunction with using the messages that are sent, you can determine when the 'native' field should move when the keyboard appears
did they forget anything ?..

-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Created a livecode field that works with Android and Mob
Perhaps a good direction for this would be to have the field instantiate its own native controls at runtime. I've been writing a library to do this for fields and other objects so I can both spend more time working directly in the IDE and also reuse more layout elements in both desktop and mobile. Such an approach gives the best of both worlds, LC fields which do a good job of providing common desktop behavior, and letting the OS provide appropriate behavior for the respective touch-based OSes.
With that in place, other aspects like filtering can be combined with specifying the mobile keyboard to be used for the appropriate entry type (email, numeric, etc.).
As I get more time to get back to my library I may be able to contribute any useful parts from that. Given the great support LC provides for mobile-native controls and that they're currently encumbered by having to script them rather than drag-and-drop them, I've been surprised that such a library isn't already shipping with LC. But at least this is something the community can do for ourselves, hopefully minimizing some of the coding we all do over and over for mobile fields, buttons, etc.
With that in place, other aspects like filtering can be combined with specifying the mobile keyboard to be used for the appropriate entry type (email, numeric, etc.).
As I get more time to get back to my library I may be able to contribute any useful parts from that. Given the great support LC provides for mobile-native controls and that they're currently encumbered by having to script them rather than drag-and-drop them, I've been surprised that such a library isn't already shipping with LC. But at least this is something the community can do for ourselves, hopefully minimizing some of the coding we all do over and over for mobile fields, buttons, etc.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 212
- Joined: Fri Feb 01, 2013 1:31 am
- Contact:
Re: Created a livecode field that works with Android and Mob
Yeah I agree, nothing can replace the native field behavior.
I hope LiveCode makes the native fields into widgets.
-Will
I hope LiveCode makes the native fields into widgets.
-Will