Android: Make view equal to parent width -20 dip?
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"
...
/>
精彩评论