0
        //Create relative layout 
        m_Layout = new RelativeLayout(this);
        RelativeLayout.LayoutParams Params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
         
        //Create surface 
        m_Canvas = new GLSurfaceView(this);
        m_Layout.addView(m_Canvas, new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT));
         
        //Register listeners 
        m_Canvas.setRenderer((Renderer) Device.instance());
        m_Canvas.setOnKeyListener((OnKeyListener) Device.instance());
        m_Canvas.setOnTouchListener((OnTouchListener) Device.instance());
         
        //If honeycomb or more, dim bar 
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) m_Canvas.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
         
        //Set focus 
        m_Canvas.setFocusableInTouchMode(true);
        m_Canvas.requestFocus();
         
        //Find accelerometer 
        SensorManager Manager 		= (SensorManager) getSystemService(Context.SENSOR_SERVICE);
        List<Sensor> Accelerometers	= Manager.getSensorList(Sensor.TYPE_ACCELEROMETER);
         
Experience pair programming with AI  Get Codota for Java