Hi,

If you do this in onCreate(), then the View didn't go through a layout
pass yet, so its size is null (0 by 0 pixels.) You need to either wait
for the first layout, or force the layout by calling layout() on the
View.

On Mon, Nov 17, 2008 at 2:34 AM, Jose Cortes <[EMAIL PROTECTED]> wrote:
>
> Hello everybody.
>
> I am working with OpenGL and Android, and I was wondering if there is
> any way to create a Bitmap or a Drawable using a view (layout). The
> purpose is to use this Bitmap as Texture for an OpenGL figure.
>
> All I have untill now is:
>
> ** I create a new view from the context and the Id.
>
> View l = new View(context);
>
> l.findViewById(R.layout.main);
>
> ** I used DrawingCache...but dont know if it is well used:
>
> l.setDrawingCacheEnabled(true);
>
> Bitmap bmp = l.getDrawingCache();
>
> this bmp is null...
>
>
> Any idea?
>
> Thanks
> >
>



-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to