Hi All,

               I have added views to layout in xml through code(i.e
dynamically).And given properties for button such as topMargin,leftMargin
etc.Yeah it will appear properly in one device.Because I gave values as per
adjustment to the current device(hdpi854) but if I will run the same code on
other screen devices i.e for mdpi it will give more gap.

               If we write views in xml ,we use to give values such as
100dp,100dpi etc.So, it can adjust according to the screen size.But if we
give these values dynamically ,it always I think take in terms of pixels.

               One of the solution can be multiplying these values with
ratio (according to device).Is there any other way to do the same?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to