Hi,

i fooled around with the softkeyboard API a little and tested it on a
couple of phones. My test setup is an activity with a GLSurfaceView
set to fullscreen. When the screen is touched the softkeyboard is
brought up via

InputMethodManager manager =
(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
manager.showSoftInput(view, 0);

A standard affair. This works flawlessly on all the phones i've
tested, e.g. Moto Droid (2.1.1), HTC Hero (1.5), Samsung Leo (2.1.1),
Asus Transformer (3.1), Nexus One (2.3.4).

It fails on the HTC Desire HD. The problem manifests itself in that
the keyboard is not shown at all. However, when one closes the app one
can briefly see the keyboard flicker on screen. The problem is not
present in non-fullscreen mode.

I assume the HTC Sense keyboard is the issue here. To confirm this i
installed one of the free IMEs from the market, and behold, it worked
without a problem.

Is there a solution to the issue? It seems there's no kind of
developer center apart from the download list at http://developer.htc.com.
Is there any way to report this to HTC directly?

For completeness, here's the source for the test activity. The
manifest file is pretty much vanilla, no additional attributes are set
for the activity.

Thanks a bunch!
Mario

package com.badlogic;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

import android.app.Activity;
import android.content.Context;
import android.opengl.GLSurfaceView;
import android.opengl.GLSurfaceView.Renderer;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnTouchListener;
import android.view.inputmethod.InputMethodManager;

public class SoftKeyboardTestActivity extends Activity implements
Renderer, OnTouchListener {
        GLSurfaceView view;

        @Override public void onCreate (Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);

      requestWindowFeature(Window.FEATURE_NO_TITLE);
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
 
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);

                view = new GLSurfaceView(this);
                view.setFocusable(true);
                view.setFocusableInTouchMode(true);
                view.setRenderer(this);
                view.setOnTouchListener(this);
                setContentView(view);
        }

        @Override public void onPause() {
                super.onPause();
                view.onResume();
        }

        @Override public void onResume() {
                super.onResume();
                view.onResume();
        }

        @Override public boolean onTouch (View arg0, MotionEvent arg1) {
                InputMethodManager manager =
(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
                manager.showSoftInput(view, 0);
                return false;
        }

        @Override public void onDrawFrame (GL10 gl) {
                gl.glClearColor(1, 0, 0, 1);
                gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
        }

        @Override public void onSurfaceChanged (GL10 gl, int width, int
height) {

        }

        @Override public void onSurfaceCreated (GL10 gl, EGLConfig config) {

        }
}

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