When developing apps (game programs) on an Android tablet with an 8-inch screen, the app cannot be displayed in full screen or configured in the first place.
Originally, the LCD should be 800*600, but always get the result of 600*600.
After several days of hard work, we can solve the problem:
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="myb.x2.app2" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".myactivity" android:screenOrientation="portrait" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true" /></manifest>
<Supports-screens Android: largescreens = "true "... /> you can solve this problem, but it takes me a long time to find a solution to this problem.
Code in activity:
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); // obtain the screen width and height. WindowManager windowManager = getWindowManager (); Display display = windowManager. getdefadisplay display (); int w = display. getWidth (); int h = display. getHeight (); v = new myview (this, w, h); setContentView (v); v. start ();}}