代码改变世界

随笔档案-2012年5月24日

android五大布局居中对齐方式

2012-05-24 16:07 by omgee, 11277 阅读, 收藏,
摘要: 1.LinearLayout(线性布局)如果是要把imagebutton之类的控件居中对齐的话,要用android:layout_gravity 代码如下: <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center_horizontal" ... 阅读全文