imageView.getLayoutParams().height = 20; // If you're setting the height after the layout has already been 'laid out', // make sure you also call: imageView.requestLayout();