if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
setContentView(R.layout.landscape);
textviewtitle = (TextView) findViewById(R.id.textView1_land);
textviewx = (TextView) findViewById(R.id.textView2_land);
textviewy = (TextView) findViewById(R.id.textView3_land);
textviewz = (TextView) findViewById(R.id.textView4_land);
surfaceview = (SurfaceView) findViewById(R.id.surfaceView1_land);
textviewtitle = (TextView) findViewById(R.id.textView1_port);
textviewx = (TextView) findViewById(R.id.textView2_port);
textviewy = (TextView) findViewById(R.id.textView3_port);
textviewz = (TextView) findViewById(R.id.textView4_port);
surfaceview = (SurfaceView) findViewById(R.id.surfaceView1_port);
}
setContentView(R.layout.landscape);
textviewtitle = (TextView) findViewById(R.id.textView1_land);
textviewx = (TextView) findViewById(R.id.textView2_land);
textviewy = (TextView) findViewById(R.id.textView3_land);
textviewz = (TextView) findViewById(R.id.textView4_land);
surfaceview = (SurfaceView) findViewById(R.id.surfaceView1_land);
}
else if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
setContentView(R.layout.portrait);textviewtitle = (TextView) findViewById(R.id.textView1_port);
textviewx = (TextView) findViewById(R.id.textView2_port);
textviewy = (TextView) findViewById(R.id.textView3_port);
textviewz = (TextView) findViewById(R.id.textView4_port);
surfaceview = (SurfaceView) findViewById(R.id.surfaceView1_port);
}