android-discuss icon indicating copy to clipboard operation
android-discuss copied to clipboard

Android五种布局的性能比较

Open arlong opened this issue 11 years ago • 4 comments

Android五种布局的性能,由高到低怎么排序? 面试被问到这个,完全不知道,求各位高手解答!

arlong avatar Apr 07 '15 08:04 arlong

Absolute, Frame, Linear, Table, Relative 纯感觉,不一定对。

iriverman avatar Apr 07 '15 15:04 iriverman

@iriverman 这个和我想的差不多,有没有确切的答案?

arlong avatar Apr 08 '15 06:04 arlong

这个要看从啥角度来看吧?还有布局是怎么写的,嵌套深度、尺寸写死还是自适应等等考虑吧?

yanbober avatar Apr 08 '15 08:04 yanbober

Absolute已经不推荐使用了,其它的看情况使用吧,上面的顺序没错,不过实际情况是勉强使用效率高的布局往往会导致嵌套过深,这种情况下就得往后看了

leonlbh4 avatar Apr 10 '15 14:04 leonlbh4