I was in a similar situation with another view and had to override
dispatchKeyEvent(). You can try and see if it helps
--
Best regards,
Dmitry

On Aug 29, 10:43 am, Gameboy <[email protected]> wrote:
> I'm trying to use SDK 1.5 for developing app on opengl feautre, but
> GLSurfaceView does not invoke OnKeyDown(...) any more, what's reason?
> App runs on windows emulator.
>
> There is sample code in SDK document:
>
>  class MyGLSurfaceView extends GLSurfaceView {
>
>      private MyRenderer mMyRenderer;
>
>      public void start() {
>          mMyRenderer = ...;
>          setRenderer(mMyRenderer);
>      }
>
>      public boolean onKeyDown(int keyCode, KeyEvent event) {
>          if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
>              queueEvent(new Runnable() {
>                  // This method will be called on the rendering
>                  // thread:
>                  public void run() {
>                      mMyRenderer.handleDpadCenter();
>                  }});
>              return true;
>          }
>          return super.onKeyDown(keyCode, event);
>      }
>  }
--~--~---------~--~----~------------~-------~--~----~
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