Android: persistentDrawingCache usage instructions,

Source: Internet
Author: User

Android: persistentDrawingCache usage instructions,

Android: persistentDrawingCache)

Defines the persistence of the drawing cache. the drawing cache might be enabled by a ViewGroup for all its children in specific situations (for instance during a scrolling .) this property lets you persist the cache in memory after its initial usage. persisting the cache consumes more memory but may prevent frequent garbage collection is the cache is created over and over again. by default the persistence is set to scrolling.

Defines the cache persistence of a drawing. The drawing cache may be composed of a ViewGroup Enable all its sub-classes in a specific situation, for example, in a rolling process. This attribute can be reserved in the memory cache after being used for the first time. Sticking to the cache will consume more memory, but it may prevent frequent garbage collection by repeatedly creating cache. By default, continuous existence is set to scroll.

Must be one or more (separated by '|') of the following constant values.

The following values can be used in an Xml file:

Constant Value Description
none 0x0 The drawing cache is not persisted after use.
animation 0x1 The drawing cache is persisted after a layout animation.
scrolling 0x2 The drawing cache is persisted after a scroll.
all 0x3 The drawing cache is always persisted.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.