Exceptions was: Exception locking surface - lockCanvas() returns a null?

by Ward Willats » Sat, 11 Apr 2009 22:49:39 GMT

Sponsored Links

Hi Stoyan:

What is your reasoning here? Why would  it be preferred to make the 
runtime setup two exception frames? That has to be more expensive 
than a simple test against null?

I mean, I see there is some exception type safety in the two frame 
approach, but is there some horrible hole in the single frame method? 
or is two frames just "taste" ?

-- Ward


Other Threads

1. DTD Handlers aren't supported.

Requirement: I'm trying to parse an XML doc from a url (Rest API) using 
org.jdom.Document Document = new SAXBuilder().parse(url.OpenStream());
such that I can perform some xpath queries and processing later on.

I'm getting the error: DTD Handlers aren't supported when I try to parse the 
I can't use the in-built java API as I am trying to develop my app on Andoid 
on 1.5 so I'm using JDOM.

Anyone know how I can parse the XML for m android app?


2. override back button

Can someone help me understand how to stop the back button from
exiting out of my program?  I want it to just return to my main menu
or exit if pressed on the main menu but when I override the method it
still exits.  Here is what I currently have:

                public boolean onKeyDown(int keyCode, KeyEvent event)  {
                    if (keyCode == KeyEvent.KEYCODE_BACK && 
== 0) {
                        if (animation.state != 1){
                                animation.state = 1;
                                return true;
                        else return false;

                    return super.onKeyDown(keyCode, event);

I have messed with it a little but my program is always still closes.


3. Quick Search Box - Getting results in "All"

4. username and password for sample sync adapter

5. [WTA] Lagfix Samsung Galaxy S

6. Force close after adding resources and textview

7. Galaxy Tab bisa jalanin Flash ?