OK, in the meantime, you can experiment with the little routine I wrote that uses the native text field. I didn’t do much testing on this, and my only testing was on iOS (not Android), so you may need to tinker with it (or just scrap it, if you don’t like it).
Remember that this uses the pasteboard plugin, so you’ll need to include it in your build settings:
http://docs.coronalabs.com/plugin/pasteboard/index.html
[lua]
local widget = require( “widget” )
local pasteboard = require( “plugin.pasteboard” )
– Create a native text input field
local field = native.newTextField( display.contentCenterX, display.contentCenterY-100, display.contentWidth-20, 30 )
field.text = “Hello World!”
field.size = 24
field:setTextColor( 1 )
field.hasBackground = false
– Function to handle pasteboard event
local function onPaste( event )
if ( event.string ) then
print( “Pasted string: [” … event.string … “]” )
end
end
– Function to handle button event
local function handleButtonEvent( event )
if ( “ended” == event.phase ) then
pasteboard.paste( onPaste )
end
end
– Create a button widget
local button = widget.newButton
{
x = 0,
top = 0,
id = “paste”,
label = “save copied portion”,
onEvent = handleButtonEvent
}
button.x = display.contentCenterX
button.y = field.y + 40
[/lua]
Brent