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

On Jan 22, 11:46 am, Kshitij Aggarwal <[email protected]> wrote:
> 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?

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