0

I have a webView in the layout only, the problem is that I have an image on a web that I should show in full size of the screen (I need a webview since I need to use javascript on the image) the image on the html gets full size of the screen (with css), but when I am using webView it doesn't get the 100% size of the phone screen (if I use the navigator it gets full size but not in webview)

This is how the webView is showed http://subefotos.com/ver/?6258d4661052175e24f39dd42af864b3x.png

This is how navigator show it http://subefotos.com/ver/?23ae0e96244e3edf380af37848a56c21x.png

What i want is to elimante the white spaces, because in galaxy ace it not much different but in highter phones the difference is so high

There is my layout:

<WebView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/webView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:keepScreenOn="true">
</WebView>
D4rWiNS
  • 2,585
  • 5
  • 32
  • 54
  • Don't understand if the problem is that the WebView doesn't get to a full size or if the WebView is in full size but the image is not. – Seraphim's Jun 26 '13 at 08:27
  • 1
    you can use zoom controls `wv.getSettings().setBuiltInZoomControls(true); wv.getSettings().setDisplayZoomControls(false);` – Krrishnaaaa Jun 26 '13 at 08:30
  • hi, thanks for the answer, i edited the post so it is more clear for everyone with an example image,i want to show it as a normal app screen so the zoom controls dont solve the problem :S – D4rWiNS Jun 26 '13 at 08:39

1 Answers1

0

Have you tried making your whole app fullscreen first?

public class FullScreen extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                                WindowManager.LayoutParams.FLAG_FULLSCREEN);

        setContentView(R.layout.main);
    }
}
Dzhuneyt
  • 8,437
  • 14
  • 64
  • 118
  • 1
    The question is not about making `Activity` full screen. – Krrishnaaaa Jun 26 '13 at 08:32
  • exactly is not about make Activity full screen is about to make WebView ullscreen i edited the post with 2 photos as example – D4rWiNS Jun 26 '13 at 08:36
  • But a WebView is constrained in the activity's view area, so you can't make the WebView take up the whole screen (in your question you claim to want to do this: "it doesn't get the 100% size of the phone screen"), you have to make your Activity fullscreen first. – Dzhuneyt Jun 26 '13 at 08:38