Um, run on a faster device.  Or don't do that.  It is a lot more work to
draw an image than fill a color...  and if your background image isn't the
exact size of the view, it also needs to be scaled which *significantly*
slows it down.

If you use the hardware accelerated drawing feature of HC then bitmaps are
basically not more expensive than drawing the screen, so now with HW acceler
turned on a standard part of the theme has a background bitmap.  However you
still really need to think about what you are doing -- Tegra 2 has enough
bandwidth I believe to paint the entire 1280x800 screen about 2.5 times, so
you really need to decide for each layer you add to your UI whether it is
actually worth it.

On Wed, May 18, 2011 at 12:06 PM, Matt M <[email protected]> wrote:

> Hello,
>
> I have a finger painting portion in my app that I built off of
> FingerPaint.java
>
> http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/FingerPaint.html
>
> I am trying to set a background image using setBackgroundDrawable()
> but upon doing so there is a significant amount of lag created when
> painting (the tip of the paint lags behind the user's finger). I'm
> calling view.setBackgroundDrawable in onCreate(). Any ideas on a fix?
>
> Any help greatly appreciated!
>
> Matt.
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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