Take a global Screenshot

257 views Asked by At

I want to capture a screenshot of my App, but my layout is transparent! So I want also the background image to appear (for example the android luncher etc.).

In the beginning I captured it like this :

public Bitmap screenshot_menu()
{
    RelativeLayout r1;

    r1 = (RelativeLayout)findViewById(R.id.relativeLayout_MAIN);
    View v1 = r1.getRootView();
    v1.setDrawingCacheEnabled(true);
    Bitmap bm = v1.getDrawingCache();


    return bm;
}

But this only takes Screenshot of my Buttons,ImageViews,Textviews etc. of my RelativeLayout.I also want to appear everything in the background. How can I achieve this ?

0

There are 0 answers