I derived a table from examples here in the site. The difference is that, while in the examples the parent of the scrollview used to make the table is directly the Activity, and the scrollview is defined in the Designer too, in my case I defined in the Designer a Panel, and then the ScrollView is programmatically defined as shown in the code below. The two variants of the layout have also a difference: in the 320x480 the Panel covers almost all the surface, leaving two buttons on the bottom, while in the 600x960 the Panel covers nearly half of the surface (this allows for keeping the keyboard active, in the only case of a tablet). The bad surprise is that the table scrolls well on a 320x480 smartphone while on a tablet with 600x960 resolution, it doesn't move at all. This should mean that a problem is connected with the resolution. It could be the InnerHeight property of the scrollview, but this property is not available (if I see well) if we define the scrollview in the program and not in the designer. Moreover, even putting its equivalent, namely the "Height" (see code), to high values seem to have effect. By the way, obviously, the examples taken from the site work well .. Any suggestion? Thanks in advance..
Attach the layout file AcmAcc.bal. The code defining the Table is:
' iTab is the indicator of the Table, say 0 (zero)
' Panel1 is the container, defined in the Designer
' SV(iTab) is the ScrollView
Sub Tabella(Dir As String, HeadersExist As Boolean,iTab As Int)
SV(iTab).Initialize(0)
SV(iTab).Panel.Color=Colors.Black
Table = SV(iTab).Panel
Table.Height=1000dip ' no effect ..
Table.Color = Colors.Black
Panel1.AddView(SV(iTab), 0dip, 8%y, 100%x, 70%y)
SelectedRow = -1
JavObj=SV(iTab) ' this and the following disable the ScrollBar ..no effect even commenting them out
JavObj.RunMethod("setVerticalScrollBarEnabled", Array As Object(False))
' follows the same function used in the examples for displaying a csv file table
LoadTableFromCSV(File.DirInternalCache, BuildCsvName(iTab), HeadersExist,iTab)
End Sub
Attach the layout file AcmAcc.bal. The code defining the Table is:
' iTab is the indicator of the Table, say 0 (zero)
' Panel1 is the container, defined in the Designer
' SV(iTab) is the ScrollView
Sub Tabella(Dir As String, HeadersExist As Boolean,iTab As Int)
SV(iTab).Initialize(0)
SV(iTab).Panel.Color=Colors.Black
Table = SV(iTab).Panel
Table.Height=1000dip ' no effect ..
Table.Color = Colors.Black
Panel1.AddView(SV(iTab), 0dip, 8%y, 100%x, 70%y)
SelectedRow = -1
JavObj=SV(iTab) ' this and the following disable the ScrollBar ..no effect even commenting them out
JavObj.RunMethod("setVerticalScrollBarEnabled", Array As Object(False))
' follows the same function used in the examples for displaying a csv file table
LoadTableFromCSV(File.DirInternalCache, BuildCsvName(iTab), HeadersExist,iTab)
End Sub