I've created a custom ViewGroup (based off of the Launcher) that
allows paging scrolls between some WebViews. Problem is that it
doesn't scroll as smoothly as I want it to. I've been following Romain
Guy's 2008 advice, but I don't see any massive improvements. Is it
because I am using WebViews, or am I just doing the prescaling wrong?
This is my code:

                 Bitmap originalImage =
BitmapFactory.decodeResource(getResources(), R.drawable.redbg);

                 originalImage = Bitmap.createScaledBitmap(
                             originalImage,          // bitmap to resize
                             ((WindowManager)
getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getWidth(),       
 //
new width
                             ((WindowManager)
getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getHeight(),      
 //
new height
                             true);                  // bilinear filtering

                 getWindow().setBackgroundDrawable(new
BitmapDrawable(originalImage));

called from onCreate. Is the right?

If not, what can I do to fix it? If not, what else can I do to speed
up the scrolling?

Thanks so much!
Rich

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