Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.app.Activity;

import android.graphics.Bitmap;

public class Main {

    public static Bitmap capture(Activity act) {
        act.getWindow().getDecorView().setDrawingCacheEnabled(true);
        Bitmap bmp = act.getWindow().getDecorView().getDrawingCache();
        return bmp;
    }
}