【发布时间】:2017-05-23 08:34:40
【问题描述】:
我通过 Java 代码创建了一个新的ImageView,但是当我尝试使用setMaxHeight 设置高度时,它不起作用。有人可以帮我改变那个 ImageView 的高度吗?
ImageView i = new ImageView(MainActivity.this);
i.setImageResource(R.drawable.red);
i.setMaxWidth(50);
i.setMaxHeight(50);
ll.addView(i);
【问题讨论】:
-
在谷歌上搜索。太老的问题