Originally LCD should be 800*600, but always get 600*600 result.
After several days of efforts to solve:
Copy Code code as follows:
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"/>
After the addition of the problem can be solved, it is not difficult to understand, but to find the solution to this problem has taken me a long time.
The code in the activity:
Copy Code code as follows:
public class MyActivity extends activity {
Public MyView v;
/** called the activity is a. */
@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);
Get screen width and height
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 ();
}
}