Alex Rivera | Logout

Android - drawing cache - when is it useful?

Asked 2010-06-23T15:22:58.737
17

I am reading about setDrawingCacheEnabled and getDrawingCache and I was wondering when is it good to use it or when its not good.

Basically in my case I have an HorizontalScrollView with many things inside it so its scrolls left/right and most of the things are not visible.

If I use setDrawingCacheEnabled(true) on the views, does it help? or this is only when I use custom views and I call getDrawingCache()?

Is there any other 'cache' way to use in a HorizontalScrollView?

Edit
Report

1 Answer

5

TouchInterceptor.java - This is class responsible for reordering your playlist in the default music player. It uses setDrawingCacheEnabled when you start dragging the current view. Basically, it creates a bitmap from the ListView item and drag it. Take a closer look at onInterceptTouchEvent method.

answered 2011-02-10T16:41:13.673

Your Answer