DIP (not me but the command)

wheretheidivides

Active Member
Licensed User
Longtime User
OK, so I programmed a card game and it looked fine on my samsung galaxy S epic 4g. I just got a Zeki 7" tablet and whamo, it didn't look so good. It is small. So I'm guessing it that I programmed it with pixels and not percentage of the screen. (I get 10 points for that).

So my first question is the layout. How do I get the layout to go full screen? I have it at 320x480 and 480x800 in the layouts so I have 2 seperate layout variants.

I believe the Zeki is 800x480 native resultion. So question #2 is why doesn't the layout variation work?

Question 3: I can hook my phone to the laptop and b4a bridge sees it no problem. When I do the same with the tablet. nothing. I need the desginer. Can not find the designer on google player. b4a bridge is there, but no designer. What am I missing.

OK, here is sample code of my game. These come from different areas.
=====================================
this is initially setting up the panels
Panel1.Top = 0
Panel1.Left = 0
=================================
later the card is shown. animated from small to big
CardPlayerRightSide1.Width=0 'width 70/105
CardPlayerRightSide1.Height=36 'height 96/144

CardPlayerRightSide1.Visible=True

For Bigger=1 To 16
CardPlayerRightSide1.Width = CardPlayerRightSide1.Width + 5dip
CardPlayerRightSide1.Height = CardPlayerRightSide1.Height + 5dip
DoEvents
Next
======================================
late the card is rotated 90 degress and then animated from small to full size:

CardPlayerRightSide2Rotated.Width=36
CardPlayerRightSide2Rotated.Height=0

CardPlayerRightSide2Rotated.Visible=True

For Bigger=1 To 16
CardPlayerRightSide2Rotated.Width = CardPlayerRightSide2Rotated.Width + 5dip
CardPlayerRightSide2Rotated.Height = CardPlayerRightSide2Rotated.Height + 5dip
DoEvents
Next
=====================================
The thing is the background is full screen but the panel seems to be at a set resultion.
so what am i missing here? How do I get the layout to go full screen? are these dips right? will the wrold end on dec 21, 2012?
 

wheretheidivides

Active Member
Licensed User
Longtime User
OK, let me say this another way.

in 320x480 (and 320x533 my cell phone), it looks fine with NO autoscale.

On a table 7" (480x800) I have to AutoScaleRate(.85) to make it look right.

If I have 1 variant and AutoScaleRate(.85), then the phone looks wrong as it's too big.

So how do you have both no autoscal and autoscale of .85 on 1 variant without making the phone too big? Right now I have a second variant at 480x800 with autoscale at .85.
 
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
As explained in the guide there is no meaning to the resolution values without the scale.

Maybe it will be simpler if you upload your layout file.

All of the scales I mentioned before were scale 1 in the layout designer. So here's my question. Using 320x480 scale 1, everything is good. The script modifys it for 320x533 scale 1 (samgung glaxy s i phone). However, looking at it on a 7" tablet, 480x800 scale 1 and it is tiny (my zeki is 640x1018 scale 1, which is longer aspect ration). So I inserted

AutoScaleRate(.75)
AutoScaleAll

first, then the same code as in 320x480. That is the only way it seems to make the images full screen. By putting the

AutoScaleRate(.75)
AutoScaleAll

in the 320x480, it will look to big on cell phones.

See what I am saying? How do you use 1 variant and autoscale? The autoscalereate will make some look good and others bad. attachment is in next message
 
Last edited:
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
Here is attachment. It was too big as the forem has a file liimit size. I deleted the 2nd variant (7" tablet 480x800 scale 1). In that variant I had the following script.

In 320x480 scale 1 variant, everything below is there EXCEPT
AutoScaleRate(.75)
AutoScaleAll

Then in 480x800 scale 1 I add first, then use the same code as 320x480 scale 1.
AutoScaleRate(.75)
AutoScaleAll

B4X:
'Autocale .75 to stretch out properly.
AutoScaleRate(.75)
AutoScaleAll
'
'Panel 1 (Splash screen)
Panel1a.HorizontalCenter = 50%x
Panel1b.HorizontalCenter = 50%x
Panel1c.HorizontalCenter = 50%x
Panel1d.HorizontalCenter = 50%x
Panel1e.HorizontalCenter = 50%x
Panel1e.Bottom = 100%y
'=============================================
'Panel 3 (Basic strategy chart)
Panel301.HorizontalCenter = 50%x
Panel302.HorizontalCenter = 50%x
Panel303.HorizontalCenter = 50%x
'=============================================
'Panel 71 (Instructions 1)
Panel71x.HorizontalCenter = 50%x
Panel71x.top = 0%y
Panel71y.HorizontalCenter = 50%x
Panel71y.bottom = 100%y
'=============================================
'Panel 73 (Instructions 2)
Panel72x.HorizontalCenter = 50%x
Panel72x.top = 0%y
Panel72y.HorizontalCenter = 50%x
Panel72y.bottom = 100%y
'=============================================
'Panel 73 (Instructions 3)
Panel73x.HorizontalCenter = 50%x
Panel73x.top = 0%y
Panel73y.HorizontalCenter = 50%x
Panel73y.bottom = 100%y
'=============================================
'Panel 74 (Instructions 5)
Panel74x.HorizontalCenter = 50%x
Panel74x.top = 0%y
Panel74y.HorizontalCenter = 50%x
Panel74y.bottom = 100%y
'=============================================
'Panel 75 (Instructions 5)
Panel75x.HorizontalCenter = 50%x
Panel75x.top = 0%y
Panel75y.HorizontalCenter = 50%x
Panel75y.bottom = 100%y
'=============================================
'Panel 75 (Instructions 5)
Panel75bx.HorizontalCenter = 50%x
Panel75bx.top = 0%y
Panel75by.HorizontalCenter = 50%x
Panel75by.bottom = 100%y
'=============================================
'Panel 76 (Instructions 7)
Panel76x.HorizontalCenter = 50%x
Panel76x.top = 0%y
Panel76y.HorizontalCenter = 50%x
Panel76y.bottom = 100%y
'=============================================
'Panel 77 (Instructions 8)
Panel77x.HorizontalCenter = 50%x
Panel77x.top = 0%y
Panel77y.HorizontalCenter = 50%x
Panel77y.bottom = 100%y
'=============================================
'Panel 78 (Instructions 9)
Panel78x.HorizontalCenter = 50%x
Panel78x.top = 0%y
Panel78y.HorizontalCenter = 50%x
Panel78y.bottom = 100%y
'=============================================
'Panel 78 (Instructions 10)
Panel79x.HorizontalCenter = 50%x
Panel79x.top = 0%y
Panel79y.HorizontalCenter = 50%x
Panel79y.bottom = 100%y
'=============================================
'Panel 80 (Instructions 11-payouts different panels)
Panel80x.HorizontalCenter = 50%x
Panel80x.top = 0%y
Panel80y.HorizontalCenter = 50%x
Panel80y.bottom = 100%y
'=============================================
'Panel Activity
'Bottom buttons panel
PanelA1.Bottom = 100%Y
PanelA1.HorizontalCenter = 50%x
'
'Right buttons panel
PanelA2.Right = 100%X
PanelA2.Bottom = 100%y
'
'Center player cards panel
PanelA3.right = 100%X
PanelA3.Bottom = 100%y
'
'Dealer cards panel
PanelA4.right = 100%X
PanelA4.top = 0%y
'
'PanelTop
PanelTop.HorizontalCenter = 50%x
'
'Top-Left debugger panel
Panel4.Top = 0%Y
Panel4.Left = 0%X
'
'The main table
ImageTable.HorizontalCenter = 50%x
'
'stretch all full-screen panels verically to fit aspect ratio
Panel1.height = 100%y
Panel3.height = 100%y
Panel71.height = 100%y
Panel72.height = 100%y
Panel73.height = 100%y
Panel74.height = 100%y
Panel75.height = 100%y
Panel75B.height = 100%y
Panel76.height = 100%y
Panel77.height = 100%y
Panel78.height = 100%y
Panel79.height = 100%y
Panel80.height = 100%y
'
'stretch all full-screen panels verically to fit aspect ratio
Panel1.width = 100%y
Panel3.width = 100%y
Panel71.width = 100%y
Panel72.width = 100%y
Panel73.width = 100%y
Panel74.width = 100%y
Panel75.width = 100%y
Panel75B.width = 100%y
Panel76.width = 100%y
Panel77.width = 100%y
Panel78.width = 100%y
Panel79.width = 100%y
Panel80.width = 100%y
'
ButtonMenuTop.HorizontalCenter = 50%x
'
 
Last edited:
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
You can call AutoScaleAll in the variant specific code so it will only be called in the larger tablet.

Maybe we are msiunderstanding each other.

If I put the variant code in the 320x480 S1 and autoscale on the variants, it doesn't work. the autocale needs to be before the code. So I need multiple variants then? Say 3 (320x480 phone, 7" and 10")???? I assume the devices will use 1 of these 2 variants? Correct?

So I should have 3 variants and the only change is the scale rate?
 
Upvote 0
Top