开发者

Android: Make view equal to parent width -20 dip?

开发者 https://www.devze.com 2023-03-07 01:28 出处:网络
Is there a way to set a layouts width to be the width of it\'s parent -20 dip? I\'m dealing with a Tabl开发者_如何转开发erowTry giving TableRow

Is there a way to set a layouts width to be the width of it's parent -20 dip? I'm dealing with a Tabl开发者_如何转开发erow


Try giving TableRow

android:paddingRight="10dip" android:paddingLeft="10dip" 

which makes it look like its width is 20dpi less than that of parent.


Set its left and right padding as needed.

<TableRow
   android:paddingLeft="10dp"
   android:paddingRight="10dp"
   ...
/>
0

精彩评论

暂无评论...
验证码 换一张
取 消