onKeyDown() functionality issue

by Kshitij Aggarwal » Fri, 22 Jan 2010 18:46:27 GMT


Sponsored Links
 Hi,

I was trying to override the back button functionality where I wanted
to call the default functionality in case a boolean is set false

public boolean onKeyDown(int keyCode, KeyEvent event) {
        boolean temp = false;
        if (event.KEYCODE_BACK == keyCode) {
            System.out.println("Back pressed");
            if (isTrue) {
                //Do something
                return true;
            }
            else return false;
        }
        return false;
    }

Now this doesn't exactly work how the documentation states. the //Do
Something part is executed well, but when isTrue is false i want the
default back functionality which is not happening. Im using SDK 1.5

Now,

   1.      How do I fix this?
   2.      Is this issue fixed in later SDK updates? If not can
someone raise a bug for the same?

--



onKeyDown() functionality issue

by Marek Uhel » Sat, 23 Jan 2010 02:59:27 GMT


 Try to call return super.onKeyDown(keyCode, event)




--


Sponsored Links


Other Threads

1. TelephonyManager NETWORK_TYPE_ for HSPA+?

What NETWORK_TYPE_ does TelephonyManager use for HSPA+ (Enhanced HSPA
not the older HSPA)?

For UMTS there is only:
NETWORK_TYPE_UMTS
NETWORK_TYPE_HSDPA
NETWORK_TYPE_HSUPA
NETWORK_TYPE_HSPA

Is it NETWORK_TYPE_HSPA?
I assume HNETWORK_TYPE_HSUPA is HSDPA + HSUPA, which would make
NETWORK_TYPE_HSPA HSPA+...

-- 

2. Handler usage

http://www.androzid.com/2010/12/handler-example.html

i'm a newbie and new to the android development


Comments are always welcome.

-- 

3. web.loadUrl not working

4. My game, what do you think help me out

5. Documentation about authTokenType in AccountManager.getAuthToken() ?

6. Launch Activity with Intent Filter on Right Time

7. About Google maps display in android emulator