6

I have an android tablet Samsung Galaxy Note 10.1 2014 Edition, which offers the screen resolution of 2560 x 1600 pixels.

I've installed Android's FireFox browser on my tablet and when I run a javascript code returning the screen width and height, the result is less actual device's screen resolution (result is: 1280 x 800 pixels)

Why it's so?

I tested it on other android devices with different screen resolutions, the result is the same.

the JavaScript code is here:

    <label id="labelWidth">Width:</label>
    <input id="textBoxWidth" type="text" class="big" />
    <br/>

    <label id="labelHeight">Height:</label>
    <input id="textBoxHeight" type="text" class="big" />
    <br/>
    </h1>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#textBoxWidth').val(screen.width);
            $('#textBoxHeight').val(screen.height);
        });
    </script>

Thanks in Advance.

AzadiSoft
  • 101
  • 4

0 Answers0