Designer Problems

IanMc

Well-Known Member
Licensed User
Longtime User
Hi all,

I'm having a problem with the designer.

It seems that if I have a panel, it will get placed sometimes correctly but sometimes incorrectly depending on if I have any views that overlap in the panel. This is really annoying as after spending many hours getting the views just right, some of them of necessity have to overlap.

To illustrate the problem I present a very simple demo.

I just called it 'screens' and basically there is an image top left, then a panel with 4 more of the same image then if you take one of the images in the panel, say the bottom right one and move it so that it overlaps another view then send the design to the UI Cloud you will get instances of it not working in some of the landscape views.

Is this a show stopper? Am I going to have to re-think my entire design because of this? Or is there a workaround?

It seems to not work in some of the landscape views when the views in the panel are overlapping then it seems to not work in some of the other landscape views when they are not overlapping :(

Please advise.

Cheers

ian
 

Attachments

  • screens.zip
    36.2 KB · Views: 203

NJDude

Expert
Licensed User
Longtime User
I don't really understand your problem, but to me it looks good if you had this on your designer script.
B4X:
AutoScaleAll

Panel1.HorizontalCenter = 50%x
Panel1.VerticalCenter = 50%y
 

IanMc

Well-Known Member
Licensed User
Longtime User
Hiya NJ, yes I tried that as well, doesn't make any difference, if you overlap some of the controls on that panel then send the design to the UI Cloud (Tools Send to UI Cloud in the Designer) then some of the landscape views will have the panel correctly centered, some of them won't.

Different ones don't work depending on whether you have the views overlapped or not.
 

NJDude

Expert
Licensed User
Longtime User
If they looked "overlapped" on th UI Cloud, run the script again on the designer and resend.

I have tested your sample on my devices and I don't see any overlapping, same thing on the UI cloud.
 

IanMc

Well-Known Member
Licensed User
Longtime User
It is the panel that does not get centered correctly on some of the Cloud UI landscapes and this seems to be affected by whether or not views are overlapping on the panel.

It also seems to have something to do with how many views you have on the panel as some of the landscape views on the UI Cloud are not centering the panel correctly even if none of the views on the panel are overlapping.

I would have thought (and hoped) that centering the panel correctly in landscape mode would not have anything to do with the views that were placed on that panel.
 

IanMc

Well-Known Member
Licensed User
Longtime User
A quick thing to try:

Remove the 4 graphics from the panel, then the panel centers correctly on every landscape view in the Cloud UI

added:

Ok, it might be just a bug with the Cloud UI as without changing anything and just keep sending the same layout to the Cloud UI sometimes it works on all of them, sometimes it doesn't work on a couple of landscapes, sometimes it doesn't center on some of the portraits.

Hmmmm.....
 
Last edited:

IanMc

Well-Known Member
Licensed User
Longtime User
Just did another experiment, delete all the graphics and only have the panel and it works every time. Make the panel width 300, Height 250, still works every time. Then start adding views to the panel (that graphic) when I get up to about 12 views it will start consistently failing on just about every one of the Cloud UI devices :(


This is with the designer script:

AutoScaleAll

Panel1.HorizontalCenter = 50%x
Panel1.VerticalCenter = 50%y

Ah, but if I rem out the AutoScaleAll then it works on nearly all of them!

So does my original layout which has a lot of views on the panel.

However it seems to fail still on a few and this seems to change randomly each time I send it to the Cloud UI even without making any changes between sends.
 
Last edited:

IanMc

Well-Known Member
Licensed User
Longtime User
Ok, I upload again, the simplest project which causes the UI Cloud to flake out :)


Log, adding Views to a panel which is set to centre, then sending it to the UI Cloud

using the script:

AutoscaleAll
Panel1.HorizontalCenter = 50%x
Panel1.VerticalCenter = 50%y

With 1 graphic on the panel I proceeded to send it to the UI Cloud time after time without changing anything.
I am expecting that the panel should be centered in each portrait and each landscape.

Times Sent Result
4 perfect
5th time perfect on all that showed but I got
Galaxy Tab 2 (10" tablet) Error occurred: Connection reset
Samsung 19000 (4" phone) Error occurred: Timeout
6th time Perfect

Ok, pretty good really, I'll try adding some more graphics.
I add three more copies of the same imageview to the panel so that there are 4 in all:

With 4 graphics on the panel:
1 perfect
2nd time it doesn't show in portrait mode for the Galaxy Note (5.3" phone) and it is not centered in portrait mode for
the HTC One X(4.7" phone)

3rd time it is not centered in landscape mode for the HTC One X(4.7" phone)
4th time it is not centered in portrait mode for the HTC One X(4.7" phone)
5th time perfect
6th time it is not centered in landscape mode for the HTC One X(4.7" phone)

Ok, so at this point we can see that it is beginning to be a bit flakey with one or two devices, what happens when we add more
graphics? Again, I just use the 'Duplicate Selected Views' function to add 2 more copies of the same imageview so that we now have 6
copies of the view on the panel. I continue sending it to the UI Cloud:

1 it is not centered in portrait or landscape for the HTC One X(4.7" phone)
it is not centered in portrait or landscape for the Nexus 7 (7" tablet)

2 it is not centered in portrait mode for the Galaxy Note (5.3" phone)
it is not centered in portrait or landscape for the HTC One X(4.7" phone)
it is not centered in portrait or landscape for the Nexus 7 (7" tablet)
it is not centered in portrait mode for the Tablet Kindle Fire

3 it is not centered in landscape mode for the Galaxy Tab 2(10" tablet)
it is not centered in portrait or landscape for the HTC One X(4.7" phone)
it is not centered in landscape mode for the Nexus 7 (7" tablet)

4 it is not centered in portrait mode for the HTC One X(4.7" phone)
5 it is not centered in landscape mode for the Galaxy Tab 2(10" tablet)

6 it is not centered in portrait or landscape for the HTC One X(4.7" phone)
it is not centered in portrait mode for the Nexus 7 (7" tablet)

7 it is not centered in portrait mode for the Galaxy Tab 2(10" tablet) (all others are correct this time)

8 it is not centered in portrait or landscape mode for the Galaxy Tab 2(10" tablet)
it is not centered in portrait mode for the HTC One X(4.7" phone)
it is not centered in portrait or landscape for the Nexus 7 (7" tablet)

9 perfect

So this time it took nine sends to the UI Cloud before all of the devices showed the panel correctly centered in both portrait
and landscape modes.

This is with six views on the panel, they all use the same graphic.

I find that if I remove the AutoscaleAll then they start behaving themselves again (but don't look as good on the tablets) but if I
then start to add more views it starts getting flakey again and my project needs 17 views of various types.

With my project I simply cannot get any of them to center.
I don't know if this means that my project's panel won't center on any of these devices or if it is due to something with the UI Cloud?

All seems to be ok on my physical device and my emulators.
 
Last edited:

IanMc

Well-Known Member
Licensed User
Longtime User
Hmmm. Didn't seem to take the file, I'll try again here:
 

Attachments

  • UICloudTest.zip
    36.3 KB · Views: 187

IanMc

Well-Known Member
Licensed User
Longtime User
Cool!

Yes I saw in one of the recent threads that someone was saying how Android could handle a great deal of views so I was pretty sure that 17 views on a panel shouldn't overload it and cause it to burst into flames :)

I look forward to trying out the new version.
 

IanMc

Well-Known Member
Licensed User
Longtime User
Perfect

This seems to work perfectly now.

Another distinct advantage of having a developer develop an IDE specifically for Android.

Does any other development system have a tool like this? I don't think so.

I just click this link and it'll show me what my design looks like on several different machines.

How cool!

Thanks Erel!

:sign0098:
 
Top