[android-developers] Transparent background overlay of SurfaceView broken on 1.5

2009-06-17 Thread Sarnoth
I believe I have found a graphics bug introduced in the 1.5 platform. I'm looking for some confirmation (or a description of what I'm doing wrong) before reporting it as a real bug. I have a SurfaceView that fills the screen and on top of that I have a LinearLayout that wraps some other

[android-developers] Re: Black Screen problem with graphics update using unlockCanvasAndPost()

2009-04-16 Thread Sarnoth
: Sarnoth, I appreciate you taking the time to comment. Does that matter - if the thread isn't different? Just in case there were problems with the thread, I rewrote the program not to use a second thread and just execute the drawing loop in the view. In the code sample, I also changed draw

[android-developers] Re: Black Screen problem with graphics update using unlockCanvasAndPost()

2009-04-15 Thread Sarnoth
I can't really say without seeing more of the code, but based on your description of the problem I wonder if your thread is in fact a separate thread or if the run method is simply being executed in the main UI thread. Something worth checking. You can log Thread.currentThread().getName() from

[android-developers] Re: How the use same instances when launching application twice

2009-04-14 Thread Sarnoth
Haven't we been over this before? http://groups.google.com/group/android-developers/browse_thread/thread/bd020f8b809a6e56/e8b9520e43410abd On Apr 14, 2:53 am, Neo mobi.liub...@gmail.com wrote: My app has 4 activities on the stack A-B-C-D (top) If you press home and re-enter the application,

[android-developers] Re: How the use same instances when launching application twice ?

2009-04-05 Thread Sarnoth
I posted with this same problem before and then it just seemed to disappear so I replied to my own post with a never mind, it works now and no real resolution. Well, as I've continued to develop I've run in to it again and figured out what is going on. There is a problem with the development

[android-developers] Re: how to color key 2d sprite backgound?

2009-03-29 Thread Sarnoth
drawing the complete background in this mode. If I have the time I certainly would like to try it. I now have the alpha issue working using the solution above. Cheers On Mar 23, 3:35 am, Sarnoth jesse.st...@gmail.com wrote: I have been frustrated by the lack of support for sprites, but I came

[android-developers] Re: how to color key 2d sprite backgound?

2009-03-22 Thread Sarnoth
I have been frustrated by the lack of support for sprites, but I came up with an idea that is backwards (literally) but might work. I haven't tested it to make sure it works as expected or to evaluate its speed. If you try it yourself I would be interested in the results. Use the same key color

[android-developers] Re: Using ColorFilter to remove image background?

2009-03-03 Thread Sarnoth
I was expecting to find a way to handle sprites with a color-keyed background but I haven't found a way. This is certainly on my wish list for future SDKs. There is AvoidXfermode but it does the opposite of what we want, keying off of a color on the destination instead of on the source. I've had

[android-developers] Re: surffaceHolder.lockCanvas(dirtyRect) help?

2009-02-26 Thread Sarnoth
I've been playing around with various drawing techniques myself and came across a few things that might help you (and others). It seems that the preferred color mode of the G1 is RGB_454 if you don't specify another type for your surface, and it runs much faster in this mode. When drawing on such

[android-developers] Re: viewable area

2009-02-11 Thread Sarnoth
I agree with Dianne about trying to use what is available to make your application as flexible as possible. But I also get the impression that people are asking these kinds of questions because they want to write games, not standard apps. There can be cases when for purposes of speed or over all