I found that on DROID OpenGL implementation acts very differently than
all other 1.5 and 1.6 phones.

Bug (1): I have a SurfaceView that has getVisibility() ==
VIEW.VISIBLE, but is completely hidden by another view. When I am in
portrait mode, and pull open the keyboard, the screen orientation does
not change. In fact, the UI is frozen and does not accept any key or
touch input. The only way to get out is to use the HOME hardware
button to go back to home screen, and then return to the app, at which
time the orientation is finally changed and UI takes input again.

The work around is this:

    public void onConfigurationChanged(Configuration newConfig) {
        mSurfaceView.setVisibility(View.INVISIBLE);
        super.onConfigurationChanged(newConfig);
    }

Bug (2): the workaround in (1) causes this problem -- when SurfaceView
that has getVisibility() == VIEW.INVISIBLE, and user presses HOME
button to pause the app, and then launches the app again, the
SurfaceView becomes black (even if I get a supposed callback that
tells me that surface is created, at which point I reloaded all of my
textures). The work around is here -- in conjunction with the above

    protected void onPause() {
        super.onPause();
        mSurfaceView.onPause();
        mSurfaceView.setVisibility(View.VISIBLE);
    }

    protected void onResume() {
        super.onResume();
        mSurfaceView.setVisibility(View.VISIBLE);
        mSurfaceView.onResume();
    }

So far these hacks seem to work fine on 1.5, 1.6 and DROID, but I am
really worried that as Android advances and fragments, eventually my
OpenGL app will get crushed by the rate of change and apparent lack of
testing by Google.

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