【发布时间】:2011-12-21 18:36:30
【问题描述】:
我想用下面的代码设置一个Imageviews,ImageIcons[i]数组的重力到中心,
ImageIcons[i] = new ImageView(this);
ImageIcons[i].setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
layout.addView(ImageIcons[i]);
我在设置重力时被卡住了。我请求 SO 的人指导我。
谢谢
【问题讨论】:
-
查看我的回答here。它帮助我集中了 Imageview。
标签: android center dynamic android-imageview gravity