Skip to content

Conversation

@atanasster
Copy link

usage :
local button = widgetExt:newButton(
{
x = xButton,
y = yButton,
width = buttonsWidth,
height = buttonsHeight,
labelAlign = “center”,
labelAlignY = “center”,
shape = {
cornerRadius = 10,
strokeWidth = 2,
strokeColor = {default = {0.5,0.5,0.5,1}, over =
{0,0,0,1}},
fillColor = {default = {0.8,0.9,0.8,1}, over =
{0.6,0.7,0.6,1}},
},

      labelColor = { default=myApp.textButtonColor, over=

myApp.textOverColor },
onRelease = onRelease,
label = btn.caption,
font = myApp.font;
fontSize = fontSizeButtons,
onRelease = onRelease,
});

usage :
       local button = widgetExt:newButton(
        {
          x = xButton,
          y = yButton,
          width = buttonsWidth,
          height = buttonsHeight,
          labelAlign = “center”,
          labelAlignY = “center”,
          shape = {
              cornerRadius = 10,
              strokeWidth = 2,
              strokeColor = {default = {0.5,0.5,0.5,1}, over =
{0,0,0,1}},
              fillColor = {default = {0.8,0.9,0.8,1}, over =
{0.6,0.7,0.6,1}},
                },

          labelColor = { default=myApp.textButtonColor, over=
myApp.textOverColor },
          onRelease = onRelease,
          label = btn.caption,
          font  = myApp.font;
          fontSize = fontSizeButtons,
          onRelease = onRelease,
              });
allow user to change the default segment after the control has been
constructed

:setDefaultSegment()
An embossed label is displayed for all themes except ios7. This change
ads an option labelNotEmbossed to prevent this
if the control is created with a custom theme, when the touch event is
processed, it checks for the current theme (if its ios7).

The problem was with the default and over colors - if the current theme
is not ios7, the control did not change the label colors. If it was
ios7, it always changed the over color to white
onScroll event added to pickerWheel so user can track changes in the
selection and update screen in real time
in the tableView constructor, pass the distance that we would like to
slide
ex
slideDistance = 160,

then in onRowRender add hidden widgets to row.hiddenGroup :

row.hiddenGroup:insert(btnDelete);
NewEditField beta -

- Replaces the newTextField with a label when not in focus
- uses a 3-frame slice for theming
- ability to place icons or buttons around the field
- ability to place a lebel in front of the field
- ability to make the field non-editable for usage like a combobox with
a list for selection
— A roundedRect frame
— Validation support (if you supply an Error Frame) if you set required
= true in the field constructor
— a 9-slice frame to support custom size edit controls
— support for theme specified in the constructor
— Support for larger height editFields
— Initial support to slide up the edit field when keyboard pops up (by
providing a slideGroup property)
— support in storyboard to maintain a list of the edit fields on the
current scene
— support in storyboard scene to validate() all the edit fields on the
current screen
— published setters/getters for isSecure, returnKey and keyboardType
Added parameter theme in the constructor for newEditField
Fixes
- Support for Calibration
- Separated editfield defaults in another file
- Added background group to eat touch events
- Support for native fields that do not swap, for scenes that are
topmost
 Added editfield_calibrationdb.lua that contains the database of
calibration data.
- Changed the textfield offsets for Android devices to account for the
adjusted height number, so now the offsets should be smaller
- Changed the fontScale alto for Corona emulator. Unfortunately the
Zooming of the emulator can not be retrieved, so to observe the real
fontScaling, you would need to Zoom In until the Zoom In is  greyed out
(actual pixel size). If the emulator is zoomed at any level, it will
display a wrong fontScale.
- Fixed the double onSubmit events
- Added androidKeyboardHeight to edit field defaults (defaults to 350
pixels) so user can change this setting in his app (like in main.lua
file)
- Added calibration string to send Email and save to file - this string
can be copy-pasted into editfield_calibrationdb.lua
- Fixed all known issues with scrolling of keyboard
Fix for slideForKeyboard in complex groups
was lost in the syncing
atanasster and others added 27 commits January 9, 2014 17:26
+fix for keyboard height scaling
fix for Android keyboard slide
fix for fake text color
- renamed placeholder to hint
- renamed widgets to buttons
- fixed field width, especially for Androids
- added 3 new Android device calibrations
Validation enabled even if an errorFrame is not supplied
editField:isModified() - returns true/false
editField:setIsModified(boolean)  - allows to reset the isModified flag
to true or false.

scene.isModified() — goes through all the fields on the current scene
and returns the first one that is modified or nil if none
scene.setIsModified(boolean) - goes through all the fields on the
current scene and resets the isModified flag
- The clear button will generate a “submitted” phase
- The scene.validateEditFields() and scene.isModified() will return an
array of the fields or nil
- Added the event.phase = “cleared”
- Removed the parameter submitOnClear
- added your button options for label button
                   label = button.label,
                   labelColor = button.labelColor,
                   fontSize = button.fontSize,
                   width = button.width,
                   height = button.height,
- Fixed the spacing for the edit field x position
Added galaxy S2 to calibration
Fixed issue with scrolling of text in iPhone5
Font scaling and font alignment does not need the calibration db anymore
calibration db not needed anymore
Updated event.target to point to the edit field when buttons pressed or
clicked
added getVersion function
… to the end of the text when it has more text than being showed;

improved textBox fakeText position on iPhone 4;
Added Nexus 7 calibration
Fixed keyboard sliding issue
	widgetLibrary/editfield_defaults.lua
@CLAassistant
Copy link

CLAassistant commented Mar 9, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ Renato Cordeiro
❌ atanasster


Renato Cordeiro seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants