layout_weight

在layout_width設置為fill_parent的時候,layout_weight所表明的是你的控件要優先盡可能的大,但這個大是有限度的,即fill_parent. web

在layout_width設置為wrap_content的時候,layout_weight所表明的是你的控件要優先盡可能的小,但這個小是有限度的,即wrap_content.spa

layout_height 同 layout_width.orm

1. layout_width="fill_parent", button1的weight=1,button2的weight=2;ci

 

2.layout_width="fill_parent", button1的weight=1,button2的weight=2000;it

 

------------------------------------------------------------------------------------------------------------------------------------------------form

 

3.layout_width="wrap_content", button1的weight=1,button2的weight=2;transform

 

 

 

4.layout_width="wrap_content", button1的weight=1,button2的weight=2000;webkit

本站公眾號
   歡迎關注本站公眾號,獲取更多信息