Sub Globals
'...... stuff'
Private jo1 As JavaObject
'...... stuff'
End Sub
Sub Activity_Create(FirstTime As Boolean)
    ScrnOrientVal = StateManager.GetSetting2("ScrnOrientVal", 1)
    If ScrnOrientVal = 0 Then
        Activity.LoadLayout("landscape")       
        'jo1 = Rdisplay
        'jo1.RunMethod("setImeOptions", Array(Bit.Or(33554432, 6)))  'IME_FLAG_NO_FULLSCREEN | IME_ACTION_DONE
    Else
        Activity.LoadLayout("portrait")
    End If
    Phone1.SetScreenOrientation(ScrnOrientVal)
    
    '...... stuff'
    
    jo1 = Rdisplay
    
    '...... stuff'
    
End Sub
Sub FLabelSet
'Brings up the keyboard to allow a Function Label to be applied to F0-F15.
'Called by Formula_click and CheckSelectionPGM
    Rdisplay.ForceDoneButton = True
    jo1.RunMethod("setImeOptions", Array(Bit.Or(33554432, 6)))  'IME_FLAG_NO_FULLSCREEN | IME_ACTION_DONE
    Sleep(250)
    kb.ShowKeyboard(Rdisplay)                                    'FLabelSet
    FMask.BringToFront
    BtnExit.BringToFront
    Idisplay.Text = "Enter F" & FNum & " Label"
    Rdisplay.RequestFocus
    Rdisplay.Text = ""
    RFocus = 1
    DoneAction = 1   
End Sub