Code example for GLSurfaceView

Methods: requestFocus, setFocusableInTouchMode

0
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
         
        mView = new MyTDView(this);
        mView.requestFocus();
        mView.setFocusableInTouchMode(true);
        setContentView(mView);
    } 
 
    @Override 
    protected void onResume() { 
    	// TODO Auto-generated method stub 
    	super.onResume(); 
    	if (mView != null) {
			mView.onResume();
		} 
    } 
     
    @Override 
    protected void onPause() {