[android-developers] Re: Button placement problems

2010-12-05 Thread Serdel
Thanks for your contribution Kostya - this really helped with greater understanding of Android layout designing, which is quite annoying to be honest :> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to an

Re: [android-developers] Re: Button placement problems

2010-12-04 Thread Kostya Vasilyev
As far as I understand, for you, the background is more important, and the buttons should be placed at certain positions within the background. Well, there is no law that says you have to use layout_margin and dp units for positioning your buttons (ImageViews). Write your own ViewGroup subcla

[android-developers] Re: Button placement problems

2010-12-04 Thread Serdel
But the problem is to place them on the same area on the screen. I only could come up with margins but I try to avoid that. Right now I have solved this by grouping the buttons in a linear layout and set the background of this layout. Then the layout is placed inside a parent relative layout and al

Re: [android-developers] Re: Button placement problems

2010-12-03 Thread Kostya Vasilyev
Adam, The "in-front/behind" order by default is the order in which views are declared in the XML file. The order, first to last (XML) becomes back to front (on screen). -- Kostya Vasilyev -- http://kmansoft.wordpress.com 03.12.2010 22:35 пользователь "Serdel" написал: > As long as you have been

[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
As long as you have been so helpful - do you know any way to put an imageview (or any other object) deliberately "behind" other objects? For example if I would like to put an image behind my buttons to make a background for the small gap between them (and I want this gap to be filled - don't want t

[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thank you Kostya and sorry for my mistake :> The ImageView approach works. Though the eclipse layout 'designer' doesn't show this (the images are cropped) it works on the device. Again thanks for the solution. -- You received this message because you are subscribed to the Google Groups "Android

[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thank you Kostya and sorry for my mistake :> The ImageView approach works. Though the eclipse layout 'designer' doesn't show this (the images are cropped) it works on the device. Again thanks for the solution. -- You received this message because you are subscribed to the Google Groups "Android

Re: [android-developers] Re: Button placement problems

2010-12-03 Thread Kostya Vasilyev
03.12.2010 19:37, Serdel пишет: Thanks Vasilyev, It's "Kostya" (V. is my last name). The aspect ration is in deed a very important factor - I was surprised why my layout looks fine in eclipse plug in but corrupts on the device. Only when I design my own dev config with proper size and ratio a

[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thanks Vasilyev, The aspect ration is in deed a very important factor - I was surprised why my layout looks fine in eclipse plug in but corrupts on the device. Only when I design my own dev config with proper size and ratio as long it worked correct. I now have a quite similar problem. Because I h

[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thanks Vasilyev, The aspect ration is in deed a very important factor - I was surprised why my layout looks fine in eclipse plug in but corrupts on the device. Only when I design my own dev config with proper size and ratio as long it worked correct. I now have a quite similar problem. Because I h

Re: [android-developers] Re: Button placement problems

2010-12-03 Thread Kostya Vasilyev
Here are a few ideas: 1. Create a background that has the maximum possible aspect ratio: it's 16:9 (1.777) for 480 by 854, and less than that for 480 by 800 (1.66), 1024 by 600 (1.7) and 320 by 480 (1.5). Push the background to the top when drawing, so that the bottom part is clipped on devi

[android-developers] Re: Button placement problems

2010-12-03 Thread Serdel
Thank you all for your response. I am now reading about supporting multiple screens in android : http://developer.android.com/guide/practices/screens_support.html My problem is that the buttons must be preciously placed to correspond properly with the background (that's why the accurate, exact dip

Re: [android-developers] Re: Button placement problems

2010-12-01 Thread Daniel Drozdzewski
2010/12/1 Serdel : > Thanks for the response. Yeah the centered_vertical is not necessary. > I put because I was wondering whether I can o a margin from the center > of the screen. For the second question - yes I need the space. The B1 > should be placed below the center of the screen, and B2 and B

Re: [android-developers] Re: Button placement problems

2010-12-01 Thread Kostya Vasilyev
01.12.2010 16:29, kernelpanic пишет: if you are using a relative layout with b2& b3 achored to the bottom left/right respectively - can you then declare b1 after these in the XML and align it above b2 You can declare b1 after b2/3 and set layout_above="@id/b2" or "b3". http://developer.andr

[android-developers] Re: Button placement problems

2010-12-01 Thread kernelpanic
if you are using a relative layout with b2 & b3 achored to the bottom left/right respectively - can you then declare b1 after these in the XML and align it above b2 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, sen

[android-developers] Re: Button placement problems

2010-12-01 Thread Serdel
Thanks for the response. Yeah the centered_vertical is not necessary. I put because I was wondering whether I can o a margin from the center of the screen. For the second question - yes I need the space. The B1 should be placed below the center of the screen, and B2 and B3 should be in the bottom r