开发者

Scrolling in Android

开发者 https://www.devze.com 2023-02-07 18:11 出处:网络
In my project I want to use 开发者_JAVA百科scrolling for rendering the pdf in landscape mode. I have used onscroll method in Android, but when I run the application on a Samsung Galaxy device the scro

In my project I want to use 开发者_JAVA百科scrolling for rendering the pdf in landscape mode. I have used onscroll method in Android, but when I run the application on a Samsung Galaxy device the scrolling is not smooth. Can anybody suggest how to get fine and smooth scrolling, and are there any methods other than onscroll?


To get smooth scrolling of a complex image, try caching it to an offscreen bitmap. The trick to minimize memory usage is to only cache a little bit beyond the visible view bounds, and regenerate the cache as the user scrolls.

For sample code, see https://github.com/ldo/view_cache_demo_android

0

精彩评论

暂无评论...
验证码 换一张
取 消