package tw.edu.pccu.MyGame003;
import android.app.Activity;
import android.os.Bundle;
import android.util.DisplayMetrics;
publicclass MyGame003_appActivity extends Activity {
private MyView m_View = null;
/** Called when the activity is first created. */
@Override
publicvoid onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
//取得螢幕解析度
DisplayMetrics l_dm = new DisplayMetrics();
this.getWindowManager().getDefaultDisplay().getMetrics(l_dm);
// 螢幕寬度 螢幕高度
m_View = new MyView( MyGame003_appActivity.this, l_dm.widthPixels, l_dm.heightPixels );
setContentView( m_View );
}
}
留言列表