Hi friends,
Is it possible to create pop up using native.showPopUp and add widget on the popup like wheelpicker,switch,checkbox, segmented control and etc?
THanks
Hi friends,
Is it possible to create pop up using native.showPopUp and add widget on the popup like wheelpicker,switch,checkbox, segmented control and etc?
THanks
You would have to construct your own popup. The native.showPopUp() is for OS specific dialogs that we have to add as functionality.
We’ve done a couple of tutorials recently that might help you code your own. See:
http://coronalabs.com/blog/2014/04/08/widgets-creating-a-sliding-panel/
http://coronalabs.com/blog/2014/04/15/tutorial-creating-a-sharing-panel/
Read them in order. The 2nd one depends on the first one.
Rob
Rob
I’m attempting to implement your sharing panel. However, I cannot get the panel to appear on the screen.
I’ve included both the newPanel and newSharingPanel code. As well as ensuring the panel isn’t added to the composer, or is added last.
All methods fire, row rendering is triggered. When I add in print statements, I am able to see it functioning. Including seeing the y position change correctly. It’s unclear why this is happening and since the panel isn’t throwing any errors, I’m not sure where else to check for debugging.
Checking tableView.numChildren reports 4 children. It appears I just can’t see it. Here is the code I am using to trigger the panel
local sharePanel function scene:show(event) if event.phase == "will" then sharePanel = widget.newSharingPanel({ location="bottom" }) local share\_btn = widget.newButton( { font="Avenir-Book", labelColor={default={130/255,130/255,130/255}}, label="SHARE", x=halfW, y=40, fontSize=24, onRelease=function() print("pressing share btn") sharePanel:toFront() sharePanel:show() end, }) end end
Thanks Rob
You would have to construct your own popup. The native.showPopUp() is for OS specific dialogs that we have to add as functionality.
We’ve done a couple of tutorials recently that might help you code your own. See:
http://coronalabs.com/blog/2014/04/08/widgets-creating-a-sliding-panel/
http://coronalabs.com/blog/2014/04/15/tutorial-creating-a-sharing-panel/
Read them in order. The 2nd one depends on the first one.
Rob
Rob
I’m attempting to implement your sharing panel. However, I cannot get the panel to appear on the screen.
I’ve included both the newPanel and newSharingPanel code. As well as ensuring the panel isn’t added to the composer, or is added last.
All methods fire, row rendering is triggered. When I add in print statements, I am able to see it functioning. Including seeing the y position change correctly. It’s unclear why this is happening and since the panel isn’t throwing any errors, I’m not sure where else to check for debugging.
Checking tableView.numChildren reports 4 children. It appears I just can’t see it. Here is the code I am using to trigger the panel
local sharePanel function scene:show(event) if event.phase == "will" then sharePanel = widget.newSharingPanel({ location="bottom" }) local share\_btn = widget.newButton( { font="Avenir-Book", labelColor={default={130/255,130/255,130/255}}, label="SHARE", x=halfW, y=40, fontSize=24, onRelease=function() print("pressing share btn") sharePanel:toFront() sharePanel:show() end, }) end end
Thanks Rob