开发者

Who to create a proportional Android layout?

I'm trying create a scaling layout for an Android application. The whole screen should contain two areas. The top 3/4 of the screen should be a MapView showing a certain area. The remaining quarter of the screen should contain some textual information to certain places shown on the map.

So now I'm wondering what is the best practice to archive this layout the 3:1 ratio of the screen partition? Is there a way to set this ratio in the layout xml file or do I have to calculate and set it manually by code in the corresponding开发者_StackOverflow activity?


try layout_weight.

set MapView to layout_weight="3", the remaining layout to layout_weight="1"


Experiment with layout_weight attribute:

http://developer.android.com/guide/topics/ui/layout-objects.html#linearlayout

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜