Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
        }
    }
}