getDrawingCache() will call buildDrawingCache() if the drawing cache
is enabled. If you want to get the darwing cache without enabling it,
just call buildDrawingCache() before calling getDrawingCahce() (and
call destroyDrawingCache() when you're done.)

On Mon, May 4, 2009 at 2:18 PM, Jeff Sharkey <[email protected]> wrote:
>
> Call setDrawingCacheEnabled(), then buildDrawingCache() as needed.
>
> j
>
> On Mon, May 4, 2009 at 2:14 PM, Meryl Silverburgh
> <[email protected]> wrote:
>>
>> Can you please tell me how does android determine when View should
>> enable the drawing cache?
>>
>> I try calling in my class (which inherits form LinearLayout)
>>
>> Bitmap drawingCache = getDrawingCache();
>>
>> I get a null in my drawingCache.
>>
>> Thank you.
>>
>> On Thu, Apr 30, 2009 at 3:48 PM, Romain Guy <[email protected]> wrote:
>>>
>>> You can also use the View's drawing cache API.
>>>
>>> On Thu, Apr 30, 2009 at 3:38 PM, dan raaka <[email protected]> wrote:
>>>> Bitmap b = Bitmap.create( ....);
>>>> Canvas c = new Canvas(b);
>>>> your_view.draw(c);
>>>> use b to in setDrawable else where
>>>>
>>>> there are missing lines, but you should get the idea
>>>> Dan
>>>>
>>>> On Thu, Apr 30, 2009 at 2:23 PM, Moto <[email protected]> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I need to somehow get a drawable of the contents of a Layout, once I
>>>>> get that "drawable" I want to set it as a background on an empty
>>>>> layout....
>>>>>
>>>>> How can I go about doing this?
>>>>>
>>>>> Thanks!
>>>>> Moto!
>>>>>
>>>>
>>>>
>>>> >
>>>>
>>>
>>>
>>>
>>> --
>>> Romain Guy
>>> Android framework engineer
>>> [email protected]
>>>
>>> Note: please don't send private questions to me, as I don't have time
>>> to provide private support.  All such questions should be posted on
>>> public forums, where I and others can see and answer them
>>>
>>> >
>>>
>>
>> >
>>
>
>
>
> --
> Jeff Sharkey
> [email protected]
>
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
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