To share problems with Android tablet computer development applications that can't be displayed in full screen _android

Source: Internet
Author: User

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 ();
}

}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.