Code example for LinearLayout

Methods: addViewsetGravity, setBackgroundColor, setContentView

0
  protected AndroidPlatform platform() { 
    return platform; 
  } 
 
  protected void setContentView(GameViewGL view) { 
    LinearLayout layout = new LinearLayout(this); 
    layout.setBackgroundColor(0xFF000000); 
    layout.setGravity(Gravity.CENTER); 
    layout.addView(gameView); 
    LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); 
    getWindow().setContentView(layout, params); 
  } 
}