且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

多种屏幕尺寸/密度柔性机器人布局

更新时间:2023-11-19 10:02:34

在Android文档中有关于这个问题的一个很大的指导:

The android documentation has a great guide on the subject:

支持多画面

他们介绍广义大小和密度,并显示资源多么的不同可以被动态地加载不同的屏幕。

They introduce generalized sizes and densities and show how different resources can be loaded dynamically for different screens.

我是新到Android自己,所以不要把我的话,但是,我认为你可以逃脱一种布局所有的屏幕尺寸,我认为RelativeLayout的将工作做好(在大多数情况下),特别的东西一样复杂的牌游戏。我主要使用LinearLayouts内RelativeLayouts当我想对齐按钮/文本水平。

I'm new to android myself, so don't take my word for it, but, I think you can get away with one layout for all screen sizes, and I think RelativeLayout will work well (in most cases), especially with something as complex as a card game. I've mainly used LinearLayouts inside RelativeLayouts when I've wanted to align buttons/text horizontally.