iOS Question Drag TableView

fishwolf

Well-Known Member
Licensed User
Longtime User
I use the Table view into my application many times

during development I realized that some tables permit the orizontal drag of table.
when i release the table return to fix, but during the scrolling the table data are not orizontal stable

why?
is it possible disable this?
 

fishwolf

Well-Known Member
Licensed User
Longtime User
i discovery that the problem is linked to this line

Table.SetColumnsWidths(Array As Int(25%x, 15%x, 9%x, 14%x, 9%x, 14%x, 14%x))

the sum of array is 100%, but the drag is enable, if i set the sum to 99%, the drag is disabled.

is it a bug o i use the class incorrectly ?

in the project is the table into color page
 

Attachments

  • DragTable.zip
    11.1 KB · Views: 231
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
Add this line to Table.Initialize:
B4X:
SV.Bounces = False

Ok, now the drag is disable, but exist a little orizonal movement when try to drag (it's little with a bit of column, is more big with many columns)

the movement is null when i set 99% of columns,

i think that a problem with round of percentage.
 
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
i have the problem on ipad2 and IOS 7.

you have to do a little drag to left -> right -> left -> more
 
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
Check the code in SetColumnsWidths subs. It adds one pixel between each two columns. So the total columns widths should be smaller than the screen width.
Add this line to see it:
B4X:
Log(SV.ContentWidth & " " & 100%x)
1029 and 1024
can i set SV.ContentWidth to 100%x if > 100%x?
or remove the last + 1 to (v.Left = Header.GetView(i-1).Left + Widths(i-1) + 1) ?
 
Upvote 0
Top