I have created a new ImageView
by Java code, but when I try to set height using setMaxHeight
, its not working. Can someone help me to change the height of that ImageView?
ImageView i = new ImageView(MainActivity.this);
i.setImageResource(R.drawable.red);
i.setMaxWidth(50);
i.setMaxHeight(50);
ll.addView(i);