Page 1 of 1
Android native field bug/help [Solved]
Posted: Mon Mar 01, 2021 4:10 pm
by EddieLee
Hi all,
So I have 2 cards, card A and B. Card B has 3 android native field and some other labels and graphics. Whenever card A goes to card b, it always shows the 3 android native fields first before lagging and showing the rest. I have already tried using lock and unlock screen, putting the preopencard script into opencard. Wonder is it a bug or something I’m doing wrong. The reason why I’m using android native field is because I’m gonna use the keyboard type number so that the keyboard on screen only allows users to key in number.
Thanks!
Re: Android native field bug/help
Posted: Mon Mar 01, 2021 6:48 pm
by dunbarx
Hi.
I do not develop for mobile, but is it possible that native fields are rendered apart from LC controls? In other words, can you hide, under LC script control, native fields? If you can, then something else is going on, because you ought to be able to control their "visible" property.
This is all conjecture.
Craig
Re: Android native field bug/help
Posted: Tue Mar 02, 2021 12:14 am
by EddieLee
dunbarx wrote: ↑Mon Mar 01, 2021 6:48 pm
Hi.
I do not develop for mobile, but is it possible that native fields are rendered apart from LC controls? In other words, can you hide, under LC script control, native fields? If you can, then something else is going on, because you ought to be able to control their "visible" property.
This is all conjecture.
Craig
Hi Craig,
So would I need to hide the native fields first and then show them when I enter the card?
Thanks!
Re: Android native field bug/help
Posted: Tue Mar 02, 2021 2:38 am
by liveme
as a failure behavior...could it be related ?
Code: Select all
https://lessons.livecode.com/m/datagrid/l/7340-what-sorts-of-things-should-i-not-do-in-order-to-avoid-needless-suffering
Don't try to draw a Data Grid on a card that Is not open
When a Data Grid renders it dynamically creates fields and accesses certain properties. Some of these properties can not be properly reported by the Revolution engine unless the field is on an open card.
Re: Android native field bug/help
Posted: Tue Mar 02, 2021 2:56 am
by EddieLee
liveme wrote: ↑Tue Mar 02, 2021 2:38 am
as a failure behavior...could it be related ?
Code: Select all
https://lessons.livecode.com/m/datagrid/l/7340-what-sorts-of-things-should-i-not-do-in-order-to-avoid-needless-suffering
Don't try to draw a Data Grid on a card that Is not open
When a Data Grid renders it dynamically creates fields and accesses certain properties. Some of these properties can not be properly reported by the Revolution engine unless the field is on an open card.
Hi,
I’m not really using a datagrid but more of a android native button/field.
Thanks!
Re: Android native field bug/help
Posted: Tue Mar 02, 2021 8:16 pm
by jacque
I had a similar issue with odd redraws when changing cards. Try the latest rc version of LC and see if the problem persists. There were some fixes in that release that may help.
Re: Android native field bug/help
Posted: Wed Mar 03, 2021 4:47 pm
by EddieLee
jacque wrote: ↑Tue Mar 02, 2021 8:16 pm
I had a similar issue with odd redraws when changing cards. Try the latest rc version of LC and see if the problem persists. There were some fixes in that release that may help.
HI Jacque,
I have solved the issue, because there was some scripts in my preopencard handler which is getting data from my database which causes the app to lag a bit therefore, the android native field has shown first before the scripts are done. Does this counts as a bug?
Thanks !
Re: Android native field bug/help
Posted: Wed Mar 03, 2021 10:21 pm
by jacque
I don't think it's a bug. PreOpenCard doesn't continue the handler until each command completes.
Re: Android native field bug/help
Posted: Wed Mar 03, 2021 11:13 pm
by liveme
which is getting data from my database which causes the app to lag a bit therefore
so eddie, did you just add a small delay untill data was fully loaded to... "solve" that ?
Re: Android native field bug/help
Posted: Fri Mar 05, 2021 6:21 am
by EddieLee
Hi All,
I just moved the extracting data from the database script down to opencard handler and it solved my issue.
Thanks !