How get the focus for GLSurfaceView

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

How get the focus for GLSurfaceView

Postby yassss » Wed Sep 23, 2009 9:29 pm

Hi all Android developer,

I have a problem concerning my game developping with opengl basic layout view.
I have created the game menu with layout (that's work), and the game part with Opengl(that's work too).
But when I want to pass from menu to game part, with
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. setContentView(mGLSurfaceView);
Parsed in 0.030 seconds, using GeSHi 1.0.8.4

I can't get the focus on my "GLSurfaceView" view.
I try
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. requestFocus() , setFocusableInTouchMode(true) , clearFocus() , requestFocusFromTouch()
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
as the documentation describes.
I have never succeed to obtain the focus to draw the game part.
Perhaps I don't use requestFocus() in the good place?

Thanks in advance,
Yassss
yassss
Freshman
Freshman
 
Posts: 2
Joined: Mon Jan 05, 2009 7:25 pm
Location: paris

Top

Postby hellgod » Wed Nov 18, 2009 10:06 pm

I got the same problem !
Did you resolve it ?
hellgod
Freshman
Freshman
 
Posts: 2
Joined: Tue Sep 22, 2009 2:06 pm

Postby yassss » Thu Nov 19, 2009 1:23 pm

hellgod wrote:I got the same problem !
Did you resolve it ?

To resolve it, I launch a new Activity as the OpenGl part.
Now I have 2 Activity, one for Canvas, other for opengl which launch by the first.
yassss
Freshman
Freshman
 
Posts: 2
Joined: Mon Jan 05, 2009 7:25 pm
Location: paris

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest