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.content.Intent;
import android.graphics.Bitmap;

import android.os.Bundle;

import android.widget.ImageView;

public class Main {
    public static Bitmap photo;

    public static void setImageToImageView(Context context, Intent intent, ImageView imageView) {
        Bundle extras = intent.getExtras();
        if (extras != null) {
            photo = extras.getParcelable("data");
            imageView.setImageBitmap(photo);
        }
    }
}