CRISTIAN_JOVE
New Member
buenas tardes soy nuevo y escribi donde no debia gracias a erel que me deribo aqui...les comento el inconveniente...estoy intentando leer codigos de barras con una pistola bluetooth y capturarlos en un edittexbox al ingresar el codigo de barras manualmente desde el teclado todo funciona bien pero al leer con la pistola capturo el salto de linea y al entrar en el evento EnterPressed la app se cierra ...no puede descubrir el error .....adjunto log y codigo por si alguien me puede dar una nano...desde ya muchas gracias y sepan disculpar la desprolijidad el codigo leido es 200700031
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_2, scanCode=3, metaState=0, flags=0x8, repeatCount=0, eventTime=2780852, downTime=2780852, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
AudioManagerEx created
50
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780852, downTime=2780852, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_2, scanCode=3, metaState=0, flags=0x8, repeatCount=0, eventTime=2780862, downTime=2780852, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780862, downTime=2780852, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780883, downTime=2780883, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_7, scanCode=8, metaState=0, flags=0x8, repeatCount=0, eventTime=2780883, downTime=2780883, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
55
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780889, downTime=2780883, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_7, scanCode=8, metaState=0, flags=0x8, repeatCount=0, eventTime=2780889, downTime=2780883, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780916, downTime=2780916, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780923, downTime=2780916, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780949, downTime=2780949, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780954, downTime=2780949, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780981, downTime=2780981, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_3, scanCode=4, metaState=0, flags=0x8, repeatCount=0, eventTime=2780981, downTime=2780981, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
51
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780988, downTime=2780981, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_3, scanCode=4, metaState=0, flags=0x8, repeatCount=0, eventTime=2780988, downTime=2780981, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x8, repeatCount=0, eventTime=2781012, downTime=2781012, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
49
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=2781012, downTime=2781012, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2782041, downTime=2781012, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2782041, downTime=2781012, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x8, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 } to DecorView@f2a097f[]
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
AudioManagerEx created
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 } to DecorView@f2a097f[]
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
finishComposingText on inactive InputConnection
finishComposingText on inactive InputConnection
Do partial code cache collection, code=19KB, data=31KB
After code cache collection, code=19KB, data=31KB
Increasing code cache capacity to 128KB
--------codigo
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private EditText1 As EditText
Private Button1 As Button
Private Label1 As Label
Dim UltimoChar = -1 As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
For i = 0 To EditText1.Text.Length - 1
Log(Asc(EditText1.Text.CharAt(i)))
Next
End Sub
Sub EditText1_TextChanged (Old As String, New As String)
Try
UltimoChar = Asc(New.SubString(EditText1.Text.Length-1))
Log(UltimoChar)
Catch
Log(LastException)
End Try
If UltimoChar = 10 Then
EditText1.Text=EditText1.Text.SubString2(0,EditText1.Text.Length-1) ' Quito el salto de línea.
'EditText1.RequestFocus
Else
'....
End If
End Sub
Sub EditText1_EnterPressed
Log("Pulsado Enter")
Log( UltimoChar)
End Sub
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_2, scanCode=3, metaState=0, flags=0x8, repeatCount=0, eventTime=2780852, downTime=2780852, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
AudioManagerEx created
50
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780852, downTime=2780852, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_2, scanCode=3, metaState=0, flags=0x8, repeatCount=0, eventTime=2780862, downTime=2780852, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780862, downTime=2780852, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780883, downTime=2780883, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_7, scanCode=8, metaState=0, flags=0x8, repeatCount=0, eventTime=2780883, downTime=2780883, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
55
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780889, downTime=2780883, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_7, scanCode=8, metaState=0, flags=0x8, repeatCount=0, eventTime=2780889, downTime=2780883, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780916, downTime=2780916, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780923, downTime=2780916, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780949, downTime=2780949, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780954, downTime=2780949, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780981, downTime=2780981, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
48
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_3, scanCode=4, metaState=0, flags=0x8, repeatCount=0, eventTime=2780981, downTime=2780981, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
51
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_0, scanCode=11, metaState=0, flags=0x8, repeatCount=0, eventTime=2780988, downTime=2780981, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_3, scanCode=4, metaState=0, flags=0x8, repeatCount=0, eventTime=2780988, downTime=2780981, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x8, repeatCount=0, eventTime=2781012, downTime=2781012, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
49
ViewRoot's KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=2781012, downTime=2781012, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2782041, downTime=2781012, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2782041, downTime=2781012, deviceId=11, source=0x101 } to DecorView@5d7b39a[main]
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x8, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 } to DecorView@f2a097f[]
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
AudioManagerEx created
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
ViewRoot's KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 } to DecorView@f2a097f[]
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
Dropping or Cancelling event: mStopped=false mPausedForTransition=false
Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_ENTER, scanCode=28, metaState=0, flags=0x28, repeatCount=0, eventTime=2781020, downTime=2781012, deviceId=11, source=0x101 }
finishComposingText on inactive InputConnection
finishComposingText on inactive InputConnection
Do partial code cache collection, code=19KB, data=31KB
After code cache collection, code=19KB, data=31KB
Increasing code cache capacity to 128KB
--------codigo
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private EditText1 As EditText
Private Button1 As Button
Private Label1 As Label
Dim UltimoChar = -1 As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
For i = 0 To EditText1.Text.Length - 1
Log(Asc(EditText1.Text.CharAt(i)))
Next
End Sub
Sub EditText1_TextChanged (Old As String, New As String)
Try
UltimoChar = Asc(New.SubString(EditText1.Text.Length-1))
Log(UltimoChar)
Catch
Log(LastException)
End Try
If UltimoChar = 10 Then
EditText1.Text=EditText1.Text.SubString2(0,EditText1.Text.Length-1) ' Quito el salto de línea.
'EditText1.RequestFocus
Else
'....
End If
End Sub
Sub EditText1_EnterPressed
Log("Pulsado Enter")
Log( UltimoChar)
End Sub