Vertical Layouts
Hi,
It's been fairly easy to understand and work with the Mobile API so far - good work.
One problem I have now is vertical layouts. My basic layout is:
- image of set height
- text of variable height
- text of variable height
I've tried the recommended solution of using height:'auto' and setting the window layout to 'vertical', but, unless I set absolute positions this does not work.
Is there a 'proper' way of making a layout like this without absolutely positioning the elements?
Thanks in advance
3 Answers
-
make sure everything is set to height:'auto' then position things by their relative top positions (and left or right naturally)
If you need to place something further up the view, you can also use negative values. (useful if you know the height of an image and want to add the label text after.)
-
Thanks for your reply, Kosso. I was a bit more patient with the examples from Kitchen Sink and I was able to get my layout working - for now!
Thanks again.
-
height:'auto' on everything within a layout:'vertical' view/window doesn't work on android.
Also, if you need to specify the width and height of an image or something within the view, you're screwed.
If someone has got it working, please post your code.
There's so many threads on this - it's a major flaw.