Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Material UI and the next phase. (feature requests)
Started by paul.cardwell Mar 20 2017 02:42 AM

28 replies to this topic
[TOPIC CONTROLS]
Page 2 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

paul.cardwell

[GLOBAL: userInfoPane.html]
paul.cardwell
  • Contributor

  • 153 posts
  • Corona SDK

@john.armstrong ..

 

Yep, I agree.  I will see what can be done.  I thinking of a "tabindex" attribute to the controls. This way developers can control the order of what control is in focus next. A "useindex" option would also be created for overall settings.  The default "tabindex" will be the order in which the controls were created and "tabindex" would be used to change the order.



[TOPIC: post.html]
#27

john.armstrong

[GLOBAL: userInfoPane.html]
john.armstrong
  • Contributor

  • 132 posts
  • Corona SDK

I've tried to edit the mui-textinput file and add another option to the textfield object with

muiData.widgetDict[options.name]["textfield"].nextFocus = options.nextFocus

and added an option to set the return key

   
 if options.returnKey ~= nil then
      muiData.widgetDict[options.name]["textfield"]:setReturnKey(options.returnKey)
    end

and so the textfield looks like

mui.newTextField({
      --  parent = mui.getParent(),
        name = "k",
        nextFocus = "cl",
        labelText = "K",
        placeholder = "0",
        text = "",
        font = "monaco",
        width = mui.getScaleVal(500),
        height = mui.getScaleVal(46),
        x = mui.getScaleVal(290),
        y = mui.getScaleVal(170),
        activeColor = { 1, 0, 0, 1 },
        inactiveColor = { 0.5, 0.5, 0.5, 1 },
        returnKey = "next",
        callBack = onTextInput,
        scrollView = scrollView
    })

 

then on the "submitted" phase I call 

local obj = mui.getTextFieldProperty(event.target.nextFocus, "layer_2")
      
      timer.performWithDelay(300, function() native.setKeyboardFocus(obj) end, 1)

And it "kind-of" works, but the problem is that the text field does not highlight or show the text being updated. You have to touch it to activate the input. 



[TOPIC: post.html]
#28

paul.cardwell

[GLOBAL: userInfoPane.html]
paul.cardwell
  • Contributor

  • 153 posts
  • Corona SDK

[0.1.98] - 2017-07-21
Changes
 
  • newTableView() - Added internal method attachBackgroundToRow(..). The newTableView() options has an attribute list. In the list you can specify 'backgroundImage' for the image to use for the row's background.  Each row has to be set and if not it will use the normal color scheme.
     
  • Demo found here: http://www.anedix.com/fileshare/checklist.zip and see checklist.lua for implementation.  Important is the newTableView() call with 'backgroundImage' added to the 'list' options.  Also the renderCallback for handling putting buttons in the row - see rowRenderButtons().


[TOPIC: post.html]
#29

paul.cardwell

[GLOBAL: userInfoPane.html]
paul.cardwell
  • Contributor

  • 153 posts
  • Corona SDK

@john.armstrong, I will be working on the solution.  The native.[widgets] are there, but MUI shows 'fake' fields for them when not active.




[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]