Java tutorial
//package com.java2s; import android.widget.ImageView; public class Main { public static void setImageLevel(ImageView imageView, Integer level) { if (imageView != null) { if (level == null) level = 0; imageView.setImageLevel(level); } else { throw new IllegalArgumentException("A view is null in your parameters."); } } }