Android получить скриншот всех элементов ListView

View v = rootView.findViewById(R.id.layout1);
if (v != null) {
    v.buildDrawingCache();
    Bitmap bitmap = v.getDrawingCache();
    canvas.drawBitmap(bitmap, dummyMatrix, null);
    v.destroyDrawingCache();   
}

У меня есть этот код. Но мне нужно сделать скриншот всех моих элементов ListView, но если мой listview 'у этого элемента больше, чем видно на экране, этот код незахватывать, когда элементы больше видимого прямоугольника.

Как правильно захватить мой ListView?

Новый рабочий код, созданный мной

public static Bitmap getWholeListViewItemsToBitmap() {

    ListView listview    = MyActivity.mFocusedListView;
    ListAdapter adapter  = listview.getAdapter(); 
    int itemscount       = adapter.getCount();
    int allitemsheight   = 0;
    List bmps    = new ArrayList();

    for (int i = 0; i < itemscount; i++) {

        View childView      = adapter.getView(i, null, listview);
        childView.measure(MeasureSpec.makeMeasureSpec(listview.getWidth(), MeasureSpec.EXACTLY), 
                MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));

        childView.layout(0, 0, childView.getMeasuredWidth(), childView.getMeasuredHeight());
        childView.setDrawingCacheEnabled(true);
        childView.buildDrawingCache();
        bmps.add(childView.getDrawingCache());
        allitemsheight+=childView.getMeasuredHeight();
    }

    Bitmap bigbitmap    = Bitmap.createBitmap(listview.getMeasuredWidth(), allitemsheight, Bitmap.Config.ARGB_8888);
    Canvas bigcanvas    = new Canvas(bigbitmap);

    Paint paint = new Paint();
    int iHeight = 0;

    for (int i = 0; i < bmps.size(); i++) {
        Bitmap bmp = bmps.get(i);
        bigcanvas.drawBitmap(bmp, 0, iHeight, paint);
        iHeight+=bmp.getHeight();

        bmp.recycle();
        bmp=null;
    }


    return bigbitmap;
}

Ответы на вопрос(4)

Ваш ответ на вопрос