Android native field bug/help [Solved]

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
EddieLee
Posts: 118
Joined: Thu Oct 25, 2018 1:06 pm

Android native field bug/help [Solved]

Post by EddieLee » Mon Mar 01, 2021 4:10 pm

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!
Last edited by EddieLee on Fri Mar 05, 2021 6:21 am, edited 1 time in total.
Eddie :D

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9662
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Android native field bug/help

Post by dunbarx » 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

EddieLee
Posts: 118
Joined: Thu Oct 25, 2018 1:06 pm

Re: Android native field bug/help

Post by EddieLee » Tue Mar 02, 2021 12:14 am

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!
Eddie :D

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

Re: Android native field bug/help

Post by liveme » 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.

EddieLee
Posts: 118
Joined: Thu Oct 25, 2018 1:06 pm

Re: Android native field bug/help

Post by EddieLee » Tue Mar 02, 2021 2:56 am

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!
Eddie :D

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7235
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Android native field bug/help

Post by jacque » 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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

EddieLee
Posts: 118
Joined: Thu Oct 25, 2018 1:06 pm

Re: Android native field bug/help

Post by EddieLee » Wed Mar 03, 2021 4:47 pm

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 !
Eddie :D

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7235
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Android native field bug/help

Post by jacque » Wed Mar 03, 2021 10:21 pm

I don't think it's a bug. PreOpenCard doesn't continue the handler until each command completes.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

Re: Android native field bug/help

Post by liveme » Wed Mar 03, 2021 11:13 pm

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 ?

EddieLee
Posts: 118
Joined: Thu Oct 25, 2018 1:06 pm

Re: Android native field bug/help

Post by EddieLee » Fri Mar 05, 2021 6:21 am

Hi All,

I just moved the extracting data from the database script down to opencard handler and it solved my issue.

Thanks !
Eddie :D

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”