liurx

学习进度2020.02.03

https://www.runoob.com/w3cnote/android-tutorial-linearlayout.html

https://www.runoob.com/w3cnote/android-tutorial-relativelayout.html

 

 

 

 今天学习下Android中的布局,Android中有六大布局,分别是: LinearLayout(线性布局),RelativeLayout(相对布局),TableLayout(表格布局) FrameLayout(帧布局),AbsoluteLayout(绝对布局),GridLayout(网格布局) 。今天先看了下LinearLayout(线性布局),学习中得知我们屏幕适配的使用的比较多的就是LinearLayout的weight(权重属性)。

下面是学习大致图:

 

 

 

 下面是用0dp方式的编译的几个简单程序:

 

 

 还可以直接用wrap_content和match_parent的话, 则要接着解析weight属性了,分为两种情况,wrap_content与match_parent!另外还要看 LinearLayout的orientation是水平还是竖直,这个决定哪个方向等比例划分

1)wrap_content比较简单,直接就按比例

 2)match_parent(fill_parent):需要计算的

分类:

技术点:

相关文章:

  • 2021-08-24
  • 2021-07-10
猜你喜欢
  • 2021-07-19
  • 2021-06-29
  • 2021-11-09
相关资源
相似解决方案