How to set a bitmap from resource
If the resource is showing and is a view, you can also capture it. Like a screenshot:
View rootView = ((View) findViewById(R.id.yourView)).getRootView();rootView.setDrawingCacheEnabled(true);rootView.layout(0, 0, rootView.getWidth(), rootView.getHeight());rootView.buildDrawingCache();Bitmap bm = Bitmap.createBitmap(rootView.getDrawingCache());rootView.setDrawingCacheEnabled(false);
This actually grabs the whole layout but you can alter as you wish.