Hello
Why when I use "TableHost" an object with 100% of x in a layout exceeds the right edge. I am forced to program in the layout an object with 95% of x for full view when TableHost is used.
thank you
1. I think Erel wants to know which object (Panel?, Label?, Listview?,etc. ) that exceeds the 100%x and where in your code you refer to it? You need to provide more details concerning the problem (un peu plus de details).
2. I, for one could not run your project because it is missing the 4 png files in this below code:
OK
All objects (panels, labels, buttons etc ) exceed 100% x.
Every object built with designer and touches the right border of the layout exceeds the layout when it is called with tabhost.
I had the same problem, was some time ago i worked on this particular project though. Think I gave a 20dip padding around, i.e. set the tabhost.left to -20dip and the width to (100%x + 40dip)
In fact, attached a small program that shows my problem. the first image shows the layout when the designer is connected to the virtual device, the second image shows the layout called by tabhost after program launched.
Designer layout : Widht 480, Height 800, Scale 1.5 (for galaxy S2).
Yes, but when I place with the designer an object against the right edge of the layout, object is not fully seen when the layout is called with the tabhost.
Why? What i have to do?
Yes, but when I place with the designer an object against the right edge of the layout, object is not fully seen when the layout is called with the tabhost.
Why? What i have to do?
Nothing strange here. You can see that your label does not start against the left edge, then how could you expect it to be correctly sized if you set its width to the maximum screen width ? It is obvious that the TabHost has an internal padding. You must take it into account and remove the padding width from the label width.
There's an easy solution if you don't want to do computations: set the label width to -1 (FILL_PARENT).