Abstract Designer & Real devices

luke2012

Well-Known Member
Licensed User
Longtime User
I'm testing my layout using designer script and abstract designer.
The point is : I have a panel that should be docked to the bottom of the screen.

Testing my script directly on the abstract designer on the device (Galaxy TAB 2 10.1) it works as expected : the panel is docked to the bottom line of the Galaxy tab.

Testing the same script deployed to the real device (apk) the panel isn't visible on the galaxy tab screen! Why?

I'm using B4A 1.9

Thanks in advance!
 

mc73

Well-Known Member
Licensed User
Longtime User
I agree with Klaus, yet, one possibility is that you enabled full screen mode at designer's view, while you haven't enabled 'full screen' at your activity's property window in the ide. I just like to guess :) Still you should upload at least part of your app containing the problem.
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
I understood my problem.
The panel that I'm using is greather than the height of the screen.

MyPanel.height=MyTabHost.height

In this case the panel is displayed within the tabhost starting belove the tab indicators but the bottom border of the panel go out the bottom border of the screen.

So the view that I docked to the bottom border of the panel isn't visible.
I understood that the panel "top" is shifted down by the tab indicators height and all the panel is shifted down.
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
In few words I need that the height of mypanel match the height between tab host indicators and tab host bottom border.
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Code :

Activity.LoadLayout("lyoTabOrderNew")
Main.ThisPhone.SetScreenOrientation(1)

tabOrderNew.SetLayout(0dip,0dip,100%x,100%y)
tabOrderNew.Color=Colors.Red
tabOrderNew.AddTabWithIcon ("",bmp1,bmp2,"lyoOrderNew1")
tabOrderNew.AddTabWithIcon ("",bmp3,bmp4,"lyoOrderNew2")
Dim CornerRadius(2) As Float
CornerRadius(0)=15
CornerRadius(1)=0
TabManager.setTabGradientDrawable2(tabOrderNew, "TOP_BOTTOM", Colors.Blue, Colors.Transparent, CornerRadius)

pnlOrderNew.Width=tabOrderNew.Width
pnlOrderNew.Height=tabOrderNew.Height
pnlButtons.BringToFront
pnlButtons.Left=pnlOrderNew.Left
pnlButtons.Top=pnlOrderNew.Height-pnlButtons.Height
pnlButtons.Width=pnlOrderNew.Width

-->tabOrderNew is within "lyoTabOrderNew"
-->pnlOrderNew & pnlButtons is within the "lyoOrderNew1"

The target is to dock the "pnlButtons" to the bottom border of "pnlOrderNew" panel
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Sample project

Hi Erel / Klaus,
as you asked me I provide you a sample project about the issue.


OK : starting with a layout and a main panel with others view inside all works fine!

PROBLEM : If you comment(disable) the LoadLayout statement and enable the tabhost, the panel will be shifted down and out of the screen and the views docked to the bottom border of the main panel isn't visible.

*** See the sample project attached...
 

Attachments

  • SAMPLE.zip
    6.7 KB · Views: 280
Last edited:
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Without seeing what you have done it's impossible to give any concrete advice.

Couldn't you post your project as a zip file so we could see what you have done and test it.

Best regards.


Hi Erel / Klaus,
as you asked me I provide you a sample project about the issue.


OK : starting with a layout and a main panel with others view inside all works fine!

PROBLEM : If you comment(disable) the LoadLayout statement and enable the tabhost, the panel will be shifted down and out of the screen and the views docked to the bottom border of the main panel isn't visible.

*** See my last post for the attachment

Thanks in advance
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Thank you for your reply !
But to be honest I don't think to understand what you mean.

Please can You explain me more in detail with samples ?

Thanks very much!
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
First of all Thanks for your support!
I found a possible problem with method addTabWithIcon of TabHost view.

When I use AddTab layout is ok but when I use addTabWithIcon layout is wrong and for example the panel go out of the screen.

In my project all the tabs use addTabWithIcon and all have the issue.

See my attached sample.
 

Attachments

  • sample_tab.zip
    7.9 KB · Views: 269
Upvote 0

klaus

Expert
Licensed User
Longtime User
What's the problem ?
I tested your test project on my two devices and an Emulator:
- Nexus One 480 x 800 x 1.5
- Asus TF 800 tablet 1200 x 1980 x 1.5
- Emulator standard size 320 x 480 x 1
And it works as expected !

So, have you tested the project you posted ?

Best regards.
 
Last edited:
Upvote 0
Top