The user uses the app to perform changeout of devices.
In addition to scan the devices barcode you can also register it manually by
typing the serial number.
But if you do, you are required to type it in twice, to make sure you got it right.
When the user moves to the confirmation edittext, the first one is set to visible=false in order for the user to actually read the number on the devuce again and not just write the same thing as in the first text.
But knowing peope, you always look for a shortcut and that's where the copy function comes in...
I bet they will start copying the contents of the first edittext before moving to the next and then paste it there.
It blocks the "direct" paste command
But Samsungs multi-clipboard feature allow the user to open a menu with clipboards item to use.
Blocking the "long click", would maby be a way to go, is that possible?
Best idea I can come up with is to test how many characters are being entered at a time, and if more than one, reject the input.
#Region Project Attributes
#ApplicationLabel: B4A Example
'SupportedOrientations possible values: unspecified, landscape or portrait.
#Region Activity Attributes
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ET As EditText
Dim ET2 As EditText
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
ET2.Text = "Do not copy this line"
Sub Activity_Pause (UserClosed As Boolean)
Sub ET_TextChanged (Old As String, New As String)
If New.Length > Old.Length + 1 Then
Msgbox("Please do not use copy/paste","Copy/Paste detected")
ET.Text = ""