Cloud UI results not same as real device?

mistermentality

Active Member
Licensed User
Longtime User
The UI Cloud is brilliant, and very useful, but I've noticed a problem with one of my layouts that looks fine in the cloud but not in actual use.

I wrote a layout that was the right size specifically for my Nexus 7 (stock but rooted) and while the layout looks perfect when sent to the cloud on the actual Nexus 7 it is small and squished.

The layout was the resolution reported by the device with a scale of 1 (but I had tried scales of 1.5 and 2 to compensate for higher density).

What I'm wondering is why does the Nexus 7 in the cloud look great with a specific layout yet my tablet which is the same shows everything on screen much smaller and squished together.

I'm asking because I've designed several layouts for different devices, all of which look perfect on the cloud devices but I'm wondering if this means they too, like the Nexus 7 variant, won't look the same on the physical devices.

Any ideas why this could be?

Thanks,

Dave
 

Rigsby

Member
Licensed User
Longtime User
The UI Cloud is brilliant, and very useful, but I've noticed a problem with one of my layouts that looks fine in the cloud but not in actual use.

I wrote a layout that was the right size specifically for my Nexus 7 (stock but rooted) and while the layout looks perfect when sent to the cloud on the actual Nexus 7 it is small and squished.

The layout was the resolution reported by the device with a scale of 1 (but I had tried scales of 1.5 and 2 to compensate for higher density).

What I'm wondering is why does the Nexus 7 in the cloud look great with a specific layout yet my tablet which is the same shows everything on screen much smaller and squished together.

I'm asking because I've designed several layouts for different devices, all of which look perfect on the cloud devices but I'm wondering if this means they too, like the Nexus 7 variant, won't look the same on the physical devices.

Any ideas why this could be?

Thanks,

Dave

Apparently a user of mine got the same on a nexus 10. And someone else has now said nexus 7 too.

And it looked OK on the UI and online emulator. Welcome to the club. It's a mystery.

I had toggle button, command buttons and labels all squashed.

What was squashed on yours ?

Have you tried using dips as heights ?

R.
 
Upvote 0

mistermentality

Active Member
Licensed User
Longtime User
In my case the Nexus 7 layout was all shrunk down into the top left corner as if it hadn't been auto scaled, what I'm doing now is keeping all layouts with just a scale of 1 and using %x and %y units and autoscale command to position the views where I want them.

Regarding designer scripts that's actually what I was testing when I first noticed the problem, I had a designer script that scaled fine in the cloud Nexus 7 but not at all on my actual tablet.

I've now got six layout variants, each with different resolution but same scale, and I adjust the placement with designer scripts. Unfortunately though it does seem that for some reason the cloud Nexus 7 will scale things that the one I have won't but as far as I know both should be the same.

Thanks,

Dave
 
Upvote 0

Stulish

Active Member
Licensed User
Longtime User
I have had a report that the S4 is displaying one of my apps incorrectly, i asked the person who reported it to send a screen shot and the attached file is it.

I use designer scripts also, so will have to look into it

Stu
 

Attachments

  • S4 - screenshot - saynoto0870.jpg
    S4 - screenshot - saynoto0870.jpg
    86 KB · Views: 172
Upvote 0

NJDude

Expert
Licensed User
Longtime User
@mistermentality
I've now got six layout variants, each with different resolution but same scale

That's what I'm talking about, you should only use the scripts, my experience, I write apps for phones, tabs and even GoogleTV, and I only use the designer scripts, to this day NOT ONE report of a bad layout.

@Stulish

It seems you are using "AutoScaleAll", that will also change the font size, that's why you see that.
 
Upvote 0

Stulish

Active Member
Licensed User
Longtime User
I found my problem, i had used a script but instead of %x or %y i used a static number.

The resolution for the Galaxy S4 is:

1080x1920 and scale is 3, using my screen size app

This app just uses:

B4X:
GetDeviceLayoutValues.Width 
GetDeviceLayoutValues.Height 
GetDeviceLayoutValues.Scale
 
Upvote 0

mistermentality

Active Member
Licensed User
Longtime User
@mistermentality


That's what I'm talking about, you should only use the scripts, my experience, I write apps for phones, tabs and even GoogleTV, and I only use the designer scripts, to this day NOT ONE report of a bad layout.

I am using designer scripts. I have one layout file and within that file several variants for different resolutions.

For each resolution there is an accompanying designer script that resides the elements and prepositions them.

Isn't that what is meant to be done, to have one layout file and for each resolution have a script to adjust dimensions and placement?

Thanks,

Dave

Sent from my Nexus 7
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
I am using designer scripts. I have one layout file and within that file several variants for different resolutions.

For each resolution there is an accompanying designer script that resides the elements and prepositions them.

Isn't that what is meant to be done, to have one layout file and for each resolution have a script to adjust dimensions and placement?

Thanks,

Dave

Sent from my Nexus 7

No, just one script one variant that's all, in very rare circumstances you might need some more variants.
 
Upvote 0

mistermentality

Active Member
Licensed User
Longtime User
No, just one script one variant that's all, in very rare circumstances you might need some more variants.

I apologise if this sounds really stupid but how can you have one variant and one script that scales well to all devices resolutions?

I started with minimum resolution of 320x240 (for a landscape only application) and was unable to make one script that scaled well at all ui cloud resolutions.

I will try playing around with one variant some more.

Thanks,

Dave
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
I apologise if this sounds really stupid but how can you have one variant and one script that scales well to all devices resolutions?

I started with minimum resolution of 320x240 (for a landscape only application) and was unable to make one script that scaled well at all ui cloud resolutions.

I will try playing around with one variant some more.

Thanks,

Dave

That's the beauty of the scripts, you should use 324x480, in your case will be very simple since you are just creating layouts for landscape only.

I don't know if you have read THIS tutorial.
 
Upvote 0

mistermentality

Active Member
Licensed User
Longtime User
That's the beauty of the scripts, you should use 324x480, in your case will be very simple since you are just creating layouts for landscape only.

I don't know if you have read THIS tutorial.

I have, I did what it recommended about using one variant and used dip values but found that buttons would not be in the same area of screen on different devices whereas with %x and %y they are so I use that method but I do appreciate your help and will try using just one or two variants only.

I still find that any png scaled up or down is always really jagged at the edges though not sure how that could be solved in a script but that's a seperate issue.

Thanks again,

Dave
 
Upvote 0

mistermentality

Active Member
Licensed User
Longtime User
Just wanted to thank you NJDude, I took your advice and after lots of trial and error now have one layout which scales well on all devices.

Thanks,

Dave
 
Upvote 0
Top