Picture different behavior

Hi,
I have a different behavior between Android and iOS; this block works perfectly in Android. Perfect image.
In iOS, the image is loaded but completely out of focus. If instead of RealtimeDB use the text block with the URL instead it works well also in iOS.

It’s strange enough. If the button through the “get property” and text block gets the same URL, then how can the image differ?

… as in first set of blocks … it works fine in both OS.
In the second set of blocks (with Firebase) … it works in both OS but in iOS the image is out of focus as you can see … incredible. I also tried to save the URL (correct obviously) in a variable but nothing.
it seems that iOS doesn’t like these kind of settings under FirebaseDB block …


pic_fire_ko

Are you sure that all the blocks get poperties return the same parameters as in the Home opens block?

  1. Set the Height and Width in the Firebase block to 650 and 366. Nothing has changed?

  2. Copy all the blocks from Home.Opens and replace them with all blocks in Realtime_DB1. Something has changed?

I noticed that maybe the problem is not the url but the numerical value about the size. In fact the two OS interpret it differently if I use “text” o “math” block.
I have to investigate better …

You’re right. I noticed that on Android crashes often occur because of the wrong type of data.

To convert a numeric value in a string to a number, you can use any mathematical block. Without the “round” block, the button does not change the size on iOS.

toint

Hello Actech,
after hundreds of tests I noticed that the problem occurs only for the “Width” block and not for the “Eight”.
Secondly also convert the text into number does not change the result … look:

  1. in the first pic the two block out of Realtime block → WORKS

  2. in the second pic the same two block under Realtime block → NOT Works

… ah … the problem is always on iOS … Android OK

It is interesting. I’ll try to do the test myself.

Yes, I see a problem on iOS.

This behavior applies to the button, and when you use the Image component, everything is displayed well and in focus.

I think so. The button properties are initially set to some initial dimensions, for example, Width = Fit content and Height = Fit contents. With simultaneous use of the blocks BackgroundPicture, Width and Height, the button sizes change, the image is loaded, but it is stretched according to the old button sizes! This is due to the asymynchronous loading of the image and at the time the image is copied, the dimensions do not have time to change.

I set the delay to 1 millisecond and the image is drawn. Two variants of time division of blocks are shown below. Is there a difference in their work? Yes.

focus

When using Var 1 on iOS 10.3, I see that when the button is clicked, the image is displayed in the initially small size of the button, and when the timer is triggered, the defocused image at the modified button sizes first appears, and then the focused one. When using Var 2 the button displays a focused image after a short delay.

just to buffer this problem is fine but you should correct at the source. It’s really annoying manage different behaviors in a CROSS platform. In any case under RealtimeDB does not work. I think there is something strange under this block.

Thanks
Andrea