开发者

Android right-left justification of view element in layout

开发者_如何学Go

How do you get a view to position itself left, right and center in a TableLayout row? Or linear layout?


You can use the android:gravity property to set the alignment you want.

<TableRow android:gravity="center">
    <LinearLayout android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:gravity="center">
    </LinearLayout>
</TableRow>

When working on the TableLayout, look for the streachColoum property. Also make it * if you want all the table columns to auto fit.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜