It looks to me that you have a problem with your anchors. On top of my mind: If we assume that swDBClean has the dark thing as parent (can't read the name), you wouldn't have to have the top anchor for the switch. (Because they will both stay the same height, and the switch is centered, as far as I can see.)
Can you try to make sure the switch have correct parent and remove top anchor and see if that solves the problem?
Yeah, I think I was wrong there, sorry. My last suggestion is that you look at your designer scripts, and code, to make sure you don't change the height of the parent. Looking at your screenshots, it doesn't seem as high as it is in the designer. It does, however, look as wide, so I'm thinking that there is something adjusting the height. That would also explain why the switch have correct distance to parent top, and not to parent bottom.
Yeah, I think I was wrong there, sorry. My last suggestion is that you look at your designer scripts, and code, to make sure you don't change the height of the parent. Looking at your screenshots, it doesn't seem as high as it is in the designer. It does, however, look as wide, so I'm thinking that there is something adjusting the height. That would also explain why the switch have correct distance to parent top, and not to parent bottom.
Aha, in that case I think it's even simpler. The switch doesn't resize, so the hitbox needs to have the exact height of the switch to end up in the middle.
Dirty suggestion (in case you don't already have this info elsewhere): Take a screenshot on your phone, open picture in image editor and measure height of switch. Use that as height for the hitbox.
Aha, in that case I think it's even simpler. The switch doesn't resize, so the hitbox needs to have the exact height of the switch to end up in the middle.
Dirty suggestion (in case you don't already have this info elsewhere): Take a screenshot on your phone, open picture in image editor and measure height of switch. Use that as height for the hitbox.
Yes ahaha, at the moment i increased the height dips one by one, until i founded the correct hitbox height. ahhaha
But i don't know if it will change by changing display size.. so i don't know if this is reliable
I wouldn't count on it. Just imagine a future OS upgrade that changes the design of the switch slightly, and height with it.
The correct way (assuming this last strategy is correct, in the first place) would be to do some code magic and ask the OS for the height of a switch. I have no idea how to do that, sorry.
I wouldn't count on it. Just imagine a future OS upgrade that changes the design of the switch slightly, and height with it.
The correct way (assuming this last strategy is correct, in the first place) would be to do some code magic and ask the OS for the height of a switch. I have no idea how to do that, sorry.
If this is a strategy you believe in, the best thing you could do is search for info on Stack Overflow (and the like) on how to get that info in the first place. Then post a new thread asking how to convert that to B4i. That would make things a lot easier for the people who know how to do those things.
If this is a strategy you believe in, the best thing you could do is search for info on Stack Overflow (and the like) on how to get that info in the first place. Then post a new thread asking how to convert that to B4i. That would make things a lot easier for the people who know how to do those things.