Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

import android.graphics.Bitmap;

import android.widget.ImageView;
import android.widget.ImageView.ScaleType;

public class Main {
    public static ImageView createImageViewFromBitmap(Context context, Bitmap bitmap) {
        ImageView imageView = new ImageView(context);
        imageView.setScaleType(ScaleType.FIT_XY);
        imageView.setImageBitmap(bitmap);
        return imageView;
    }
}