LinearLayout、RelativeLayout 和 AbsoluteLayout 有什么区别? [英] What are the differences between LinearLayout, RelativeLayout, and AbsoluteLayout?
问题描述
我对 LinearLayout、RelativeLayout 和 AbsoluteLayout 之间的区别感到困惑.有人可以告诉我它们之间的确切区别吗?
LinearLayout
意味着你可以一个一个(垂直/水平)对齐视图.
RelativeLayout
表示基于其父视图和其他视图的关系.
ConstraintLayout
类似于 RelativeLayout,因为它使用关系来定位和调整小部件的大小,但具有额外的灵活性并且更易于在布局编辑器中使用.
WebView
加载 html、静态或动态页面.
已弃用 - AbsoluteLayout
意味着您必须给出视图应在的确切位置.
更多信息请查看这个地址https://developer.android.com/guide/topics/ui/declaring-layout#CommonLayouts
I am confused about the difference between LinearLayout, RelativeLayout, and AbsoluteLayout. Could someone please tell me the exact differences between them?
LinearLayout
means you can align views one by one (vertically/ horizontally).
RelativeLayout
means based on relation of views from its parents and other views.
ConstraintLayout
is similar to a RelativeLayout in that it uses relations to position and size widgets, but has additional flexibility and is easier to use in the Layout Editor.
WebView
to load html, static or dynamic pages.
FrameLayout
to load child one above another, like cards inside a frame, we can place one above another or anywhere inside the frame.
deprecated - AbsoluteLayout
means you have to give exact position where the view should be.
For more information, please check this address https://developer.android.com/guide/topics/ui/declaring-layout#CommonLayouts
这篇关于LinearLayout、RelativeLayout 和 AbsoluteLayout 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!