I run the application on Android 3.0 (Motorola Xoom). The problem is that it is displayed very small. The rest of the display is black. At the same time, a scroll appears in the application window. On the previous android everything was fine. What to specify in the code that my application occupied the whole screen? Maybe you need to specify something in the system settings?


public class WebUIProto extends Activity { WebView page; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Setup browser setContentView(R.layout.main); page = (WebView)findViewById(R.id.WebView); WebSettings webSettings = page.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setSupportZoom(false); webSettings.setBuiltInZoomControls(true); webSettings.setGeolocationEnabled(true); webSettings.setSupportMultipleWindows(false); webSettings.setLoadsImagesAutomatically(true); webSettings.setJavaScriptEnabled(true); page.loadUrl("http://hashcode.ru/"); } } 

In R.layout.main did not change anything.

  • one
    And your main layout can somehow look? - Dex

1 answer 1

Try to write in the manifest

 <supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" /> <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8"/> 

If it does not work, show the markup file.

  • It really helped. - Nicolas Chabanovsky