Dim r As Rect
r.Initialize(0,0,0,0)
Dim WindowVisibleDisplayFrame As JavaObject = ctxt.RunMethodJO("getWindow", Null)
WindowVisibleDisplayFrame = WindowVisibleDisplayFrame.RunMethodJO("getDecorView", Null)
WindowVisibleDisplayFrame = WindowVisibleDisplayFrame.RunMethodJO("getWindowVisibleDisplayFrame",Array(r))
If GetDeviceLayoutValues.Width > GetDeviceLayoutValues.Height Then
lv.Width = lv.Width - r.left
Else
lv.Height = lv.Height - r.top
End If