Java tutorial
//package com.java2s; import android.widget.ImageView; public class Main { /** * Resize ImageView * @param iv */ public static void resizeImageView(ImageView iv, int w, int h) { if (iv != null && w > 0 && h > 0) { iv.requestLayout(); iv.getLayoutParams().width = w; iv.getLayoutParams().height = h; } } }