You can use the label_longClick event subroutine, and there popup a inputList containing the actions you want the user to be able to perform.
B4X:
sub label_longclick
dim ls as list, rst as int
ls.initialize
ls.addall(array as string("COPY","CUT","PASTE"))
rst=inputList(ls,"Choose:",-1)
select rst
case 0
'copy
case 1
'cut
case 2
'paste
case -1
return
end select
end sub
I've looked at it. It's a designer's file, not the actual code. Anyway, the code I posted works. If you need help with your coding, you can always upload it here, 'file->export as zip', I am sure there are many member of this forum, willing to help.
Sorry but I don't understand what exactly you want to do.
Where does the text come from ?
What is the user supposed to do ?
Where will the text be copied.
Sorry, but I haven't found a way to avoid the keyboard being displayed after having clicked on Select Text in the popup menu.
I don't think you could do it with a Label.
so user has to have the ability to partially select words? cool. split words and place them in different labels. user clicks the label -> grab the word -> place it at the element you want.
Sub Globals
Dim EditText1, EditText2 As EditText
Dim Obj1 As Reflector
Dim IME1 As IME
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
Obj1.Target = EditText1
EditText1.Tag = "EditText1"
Obj1.SetOnLongClickListener("EditText1_LongClick")
IME1.Initialize("")
End Sub
Sub EditText1_LongClick(viewtag As Object) As Boolean
IME1.HideKeyboard
Return False
End Sub
Sub EditText1_TextChanged (Old As String, New As String)
EditText1.Text = Old
End Sub