It would be:
Ph.HideKeyboard(B4XPages.GetNativeParent(Me))
but:
1 - It is better to use the library IME:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private Display1 As EditText
' Private dummytext As EditText ' no more needed
Private IME1 As IME
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
IME1.Initialize("IME1")
End Sub
Sub Display1_EnterPressed
IME1.HideKeyboard
End Sub
2 - both methods would only work with B4A, of course.