B4X:
Sub BuildInputSheet() As ABMModalSheet
Dim inp As ABMModalSheet
inp.Initialize(page, "inp", True, False, "sheet1")
inp.IsDismissible = False
ABMShared.setScrnSize( page) ' this determines if it is a PHONE - sets ScrnSize var
Log( "build feed sheet size in build input: "&ABMShared.ScrnSize)
If ABMShared.ScrnSize = 0 Then
inp.Size = ABM.MODALSHEET_SIZE_FULL
Else
inp.Size = ABM.MODALSHEET_SIZE_NORMAL
End If
Sub setScrnSize(pg As ABMPage)
Dim ret As Int = 2
Try
Dim NowWH As String = ABM.GetBrowserWidthHeight( pg) ' returns a string "width;height"
If NowWH <> "" And NowWH <> ";" Then ' check if we got something useful back
Dim split() As String = Regex.Split(";", NowWH) ' split the string
Dim NewH As Int = split(0)
Log(" width in PX: "&NewH)
If NewH < 600 Then ret = 0 ' phone
If NewH > 600 And NewH <= 992 Then ret = 1 ' tablet landscape
If NewH > 992 Then ret = 2 ' desktop
End If
Catch
Log(" screen setting failed!")
End Try
Log(" screen width: " &ret)
ScrnSize = ret
End Sub
This doesn't work.
Essentially, I would like ABM.MODALSHEET_SIZE_FULL if phone
or Normal if above phone size. Screwed around to no avail...