开发者

Positioning buttons at fixed position on backgound image for different screens?

I am using relative layout for one of my main activity with a image background. I want to position four buttons(with background images)at a fixed position on the backgro开发者_开发知识库und image (of the activity).

I created main.xml specifying buttons relative to each other with different margin in dip. The problem is if the screen density change , the background image (activity) scales up and down but the buttons(with background image)don't. Is there any way They can be positioned at the same place for all the screens? Do I have to create 3 different layout for small , medium , large or is there any other way? I am using 2.3.3.


The recommended way to do this is with different XML layout files with different qualifiers for layout-{size}. So you are correct, this is the recommended way to handle this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜