Objective
Welcome everyone I share and recommend useful code Snippets ~ ~
Statement
Welcome reprint, but please keep the original source of the article:
Csdn:http://www.csdn.net
Rainy season o mo away: http://blog.csdn.net/luckkof
Body
ViewGroup---Properties
Android:persistentdrawingcache (official Google translation)
Defines The persistence of the drawing cache. The drawing cache might is enabled by a viewgroup for all it children in specific situations (for instance during a Scrol Ling.) The lets persist the cache in memory with its initial usage. Persisting the cache consumes more memory but may prevent frequent garbage collection are the cache is created over and Ove R again. By default, the persistence is set to scrolling.
defines the persistence of the drawing's cache. The drawing cache may be enabled by a viewgroup for all its subclasses, for example, during a scrolling process. This property can be persisted in its in-memory cache after initial use. Persisting the cache consumes more memory, but may prevent frequent garbage collection from repeatedly creating the cache. By default, the persistence is set to scroll.
Must is one or more (separated by ' | ') of the following constant values.
The values that can be used in the XML file are:
| Constant |
Value |
Description |
| < Code style= "Color:rgb (0,102,0); line-height:14px; margin-bottom:0px ">none |
0x0 |
the drawing cache is not persisted after use. |
| < Code style= "Color:rgb (0,102,0); line-height:14px; margin-bottom:0px ">animation |
0x1 |
the drawing cache is persisted after a layout animation. |
| < Code style= "Color:rgb (0,102,0); line-height:14px; margin-bottom:0px ">scrolling |
0x2 |
the drawing cache is persisted after a scroll. |
all |
0x3 |
The drawing cache is always persisted. |