android get reference to layout in code
<p>I need to get reference to separate XML file wich is FrameLayout but I can't figure out how to do it ,this code doesn't work: </p>

<pre><code>        FrameLayout desktopFrameLayout = (FrameLayout) findViewById(R.id.desktopsFramelayout);
        desktopFrameLayout.setDrawingCacheEnabled(true);
        desktopFrameLayout.buildDrawingCache();
        Bitmap bitmap = desktopFrameLayout.getDrawingCache();
</code></pre>
