<http://schemas.android.com/apk/res/android>"
package="myb.x2.app2"
android:versionCode="1"
android:versionName="1.0">
<android:screenOrientation="portrait"
android:label="@string/app_name">
<android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true" />
public class myactivity extends Activity {
public myview v;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.main );
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
// 获得屏幕宽和高
WindowManager windowManager = getWindowManager();
Display display = windowManager.getDefaultDisplay();
int w = display.getWidth();
int h = display.getHeight();
v=new myview(this,w,h);
setContentView(v);
v.start();
}
}