标签:android io ar sp div c on cti r
当在tablelayout中显示图片时,设置imageView为固定大小时,会出现divide by zero 错误
将LayoutParams 改为 TableRow.LayoutParams即可
TableRow.LayoutParams params = new TableRow.LayoutParams(50, 50);//50 x 50
TableRow row = new TableRow(activity);
ImageView imgView = new ImageView(activity);
imgView.setLayoutParams(params);
imageLoader.displayImage(fileName, imgView, options);//显示图片
row.addView(imgView);
vh.imgLayout.addView(row);
mark~
标签:android io ar sp div c on cti r
原文地址:http://www.cnblogs.com/george-cw/p/4003856.html