解决办法:
//设置为原大小
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
//也可设置成固定大小
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(100,100);
image.setLayoutParams(lp);
解决办法:
//设置为原大小
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
//也可设置成固定大小
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(100,100);
image.setLayoutParams(lp);