Sub Globals
Dim IME As IME
Dim pnl_top As Panel
Dim pnl_bottom As Panel
Dim edt_text_top As EditText
Dim edt_text_bottom As EditText
Dim focusedEditText As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
IME.Initialize("IME")
IME.AddHeightChangedEvent
Activity.LoadLayout("Layout1")
End Sub
Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int)
If focusedEditText = edt_text_bottom Then
If NewHeight < OldHeight Then
pnl_bottom.Top = 0
Else
pnl_bottom.Top = 50%y
End If
End If
End Sub
Sub edt_text_top_FocusChanged (HasFocus As Boolean)
If HasFocus Then focusedEditText = Sender
End Sub
Sub edt_text_bottom_FocusChanged (HasFocus As Boolean)
'note that you can use the same sub by setting the EventName of the EditTexts
If HasFocus Then focusedEditText = Sender
End Sub