Any way to speedup font/size change in text field?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Any way to speedup font/size change in text field?
On Android mobile devices...
OK I realize this is a lot of text in a text field (70,000 words, 400k plain text file size) but the process of changing the font or font size (set the textsize of field "Whatever" to 14) takes over 5 seconds. I guess this would not be so bad if I had a way to show a progressbar while this is going on. The user thinks things are frozen and continues to click on the button to change the font size of this text field.
Anybody got any ideas of things I might try?
Thanks.
OK I realize this is a lot of text in a text field (70,000 words, 400k plain text file size) but the process of changing the font or font size (set the textsize of field "Whatever" to 14) takes over 5 seconds. I guess this would not be so bad if I had a way to show a progressbar while this is going on. The user thinks things are frozen and continues to click on the button to change the font size of this text field.
Anybody got any ideas of things I might try?
Thanks.
Re: Any way to speedup font/size change in text field?
Hi Tony,
I don't develop for mobile, but to be sure:
You do "lock/unlock screen" before and after setting the font/size, do you?
Best
Klaus
I don't develop for mobile, but to be sure:
You do "lock/unlock screen" before and after setting the font/size, do you?
Best
Klaus
Re: Any way to speedup font/size change in text field?
Yes I did set the lockscreen to TRUE. I did not make any difference in how long it took for the font size of a field to be changed.
-
- VIP Livecode Opensource Backer
- Posts: 9579
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Any way to speedup font/size change in text field?
Hi.
Is this a mobil thing? It took me 8 ticks to set the textSize of a field of 70,000 words with locking.
Craig
Is this a mobil thing? It took me 8 ticks to set the textSize of a field of 70,000 words with locking.
Craig
Re: Any way to speedup font/size change in text field?
Yes it takes (for me anyway) over 5 seconds for my Android app on a Samsung Note 4 to change the textsize of a field containing 70,000 words. I assume you are talking about it taking 8 ticks for you on a desktop?
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Any way to speedup font/size change in text field?
Can you show the code you're using to do this?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Any way to speedup font/size change in text field?
This is all I'm doing...
on mousedown
set the lockscreen to TRUE
if the textsize of field "TheText" = 12 then
set the textsize of field "TheText" to 14
else if the textsize of field "TheText" = 14 then
set the textsize of field "TheText" to 16
else if the textsize of field "TheText" = 16 then
set the textsize of field "TheText" to 18
else if the textsize of field "TheText" = 18 then
set the textsize of field "TheText" to 12
end if
set the lockscreen to FALSE
end mousedown
After clicking on a button with this script, it is executed and it take ~ 5 seconds to finish changing the font size of this field containing 70,000 words on my Android Samsung Note 4 phone.
on mousedown
set the lockscreen to TRUE
if the textsize of field "TheText" = 12 then
set the textsize of field "TheText" to 14
else if the textsize of field "TheText" = 14 then
set the textsize of field "TheText" to 16
else if the textsize of field "TheText" = 16 then
set the textsize of field "TheText" to 18
else if the textsize of field "TheText" = 18 then
set the textsize of field "TheText" to 12
end if
set the lockscreen to FALSE
end mousedown
After clicking on a button with this script, it is executed and it take ~ 5 seconds to finish changing the font size of this field containing 70,000 words on my Android Samsung Note 4 phone.
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Any way to speedup font/size change in text field?
Hi tonymac,
Best regards
Jean-Marc
Code: Select all
on mouseUp
lock screen
put the textsize of fld "theText" into tSize
if tSize = 18 then
put 12 into tSize
else
add 2 to tSize
end if
set the textsize of fld "theText" to tSize
unlock screen
end mouseUp
Jean-Marc
https://alternatic.ch
Re: Any way to speedup font/size change in text field?
Thanks Jean-Marc for your suggestion however there was no improvement in the amount of time it took to change the font size.