Datagrid scroller interfering with other cards

The place to discuss anything and everything about running your LiveCode on Android

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
Posts: 171
Joined: Wed Jul 08, 2015 5:51 am
Location: Wellington, New Zealand

Datagrid scroller interfering with other cards

Post by KimD » Wed May 15, 2019 8:16 am

LC 9.0.4 --- Android 8.1.0

1) I create and populate a datagrid table on card AAA. In the data grid's custom properties I set the vertical scrollbar to true.
- On windows the scroller works as-is
- On Android the scroller works as-is while I stay on the card that the data grid is on.

2) But, when on Android I navigate to:
card BBB - about 10% of the time I get a "ghost" vertical scrollbar appearing in the location where it was on card AAA
card CCC, which includes a mobileControlCreate scroller - about 70% of the time the mobile scroller isn't displayed

Some of the things that I've tried

3) In the data grid's custom properties, setting the vertical scrollbar to false. When I do this both of the problems identified in point 2 stop occurring. But, of course, I can't scroll my datagrid.

4) Testing the mobileControls() on each card. Nothing unexpected shows up. Card BBB shows zero mobileControls, even while the ghost scrollbar is visible. Card CCC shows only the mobileControl that I had created for that card.

5) Testing the mobileControlGet(MyScrollerID, "visible") on card CCC. This returns true, even when no scrollbar is visible.

6) Testing the rect and contentRect of the he mobileControl on card CCC. These look normal.

7) Setting dgProps["show vscrollbar"] to false on CloseCard AAA, and true on OpenCard AAA. This improved things. I ended up with less ghost scrollbars on Card BBB and less cases of mobileControlCreate scroller not resulting in a scroller on card CCC, but both of these things still did occur.

8) Abandoning the datagrids built in scrollbar function entirely, and instead using mobileControlCreate to create a scroller for the datagrid. I've tried two approaches within this:
- keeping the scroll window small (part of the card); and
- scrolling the whole card.
Both approaches worked, but both also resulted in a massive increase in the time that it took to open card AAA. By playing around with the height of the datagrid, I was able to ascertain that the time that it took LC to draw the datagrid was strongly influenced by the footprint of the DG, rather than the contents of the DG.

At the moment, I've almost run out of ideas for things to try. Except that - I have realised that I also have a mobileControlCreate scroller on card AAA (the card that also has the dg scroller). I'll try removing this tommorrow and see if that helps.

Any help would be much appreciated



Posts: 171
Joined: Wed Jul 08, 2015 5:51 am
Location: Wellington, New Zealand

Re: Datagrid scroller interfering with other cards

Post by KimD » Thu May 16, 2019 7:41 am

Today I discovered the problem occurs when selecting a entry in a datagrid is used to trigger a change of card. If the datagrid has focus at the time the "go to card" occurs, then I sometimes get ghost scroll bars appearing on the other card and sometimes get real scroll bars on the other card being "jammed". If I "Focus on nothing" before "Go to card", then the problem goes away. We'll, I'e carried out over 100 tests and haven't seen it again so hopefully it's gone away. Once I've finished my current project I'll try to replicate this in a simple stack. If I can then I'll submit a bug report.

Post Reply

Return to “Android Deployment”