Topic: Not appearing right on android

Hi there,

I've created a gallery which works great on my desktop but as soon as I try and view it on my android phone or tablet it resizes the website and the swipe feature does not work. I have tried the sample 'modern' gallery at http://www.simpleviewer.net/simpleviewe … es/modern/ and it works fine.

The website I am working on is http://www.yorkmotorhomehire.co.uk/vehicle.html

I have also set up a test page which has no formatting, literally just the code for the gallery but that still doesn't work. http://www.yorkmotorhomehire.co.uk/test.htm

Thanks in advance

Alex

Re: Not appearing right on android

I have also set up a test page which has no formatting, literally just the code for the gallery but that still doesn't work. http://www.yorkmotorhomehire.co.uk/test.htm

This may not work as it is just the embedding code for the gallery and is not a complete web page. (Every web page requires certain elements to be present such as a Doctype Declaration, <head> and <body> tags.)
Try changing the code on your 'test.html' page to the following (and clear your browser's cache before reloading the page):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>SimpleViewer-Pro Gallery</title>
</head>
<body>
    <!--START SIMPLEVIEWER EMBED.-->
    <script type="text/javascript" src="/svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
        var flashvars = {};
        flashvars.baseURL = "http://www.yorkmotorhomehire.co.uk/";
        simpleviewer.ready(function () {
            simpleviewer.load("sv-container", "640px", "640px",  "transparent", true, flashvars);
        });
    </script>
    <div id="sv-container"></div>
    <!-- END SIMPLEVIEWER EMBED -->
</body>
</html>

Try validating the code on your web page with the W3C Markup Validation Service and fix the errors reported.
Once the code on your web page validates correctly, the page should be rendered with greater predictability and consistency across different browsers and devices. This should hopefully help.

Steven Speirs
SimpleViewer Support Team.

Re: Not appearing right on android

Cheers for the suggestion. I have updated my test.htm page to what you suggested and still not working right on an android phone.

Alex

Re: Not appearing right on android

Make sure that JavaScript is enabled in your browser and clear your browser's cache to ensure that it is fetching and using the most recent versions of your gallery files from your web server.

If our 'Modern' demo gallery works fine but your own test gallery (on a page of its own using the same version of SimpleViewer) does not, then the problem may be to do with either your web server or internet connection rather than the gallery itself.

If you are viewing the gallery over a 3G connection rather than wi-fi, please see this FAQ:
Why can't I view my gallery on a 3G mobile connection?

If you think that this might be a contributing factor, a possible solution would be to create an .htaccess file containing the following code and upload it to your website's root directory. (Please note that this requires an Apache web server.)

<IfModule mod_headers.c>
Header set Cache-Control "no-transform"
</IfModule>

This should prevent content modification on your site when visitors view your galleries over a 3G connection.

You could also contact your 3G provider to see if it is possible for content modification to be turned off on your account (although this will help only when you view other people's galleries and will not solve the problem of other people viewing your own galleries over their own 3G connections, which the solution above tackles).

Steven Speirs
SimpleViewer Support Team.

Re: Not appearing right on android

That last post appears to have done the trick by adding .htaccess to the directory. The page still zooms strangely but now allows me to zoom back out and use the swipe feature.

Thanks for your assistance, much appreciated.

Alex

Re: Not appearing right on android

That last post appears to have done the trick by adding .htaccess to the directory.

That's great! Thank you for posting back to let me know.

The page still zooms strangely but now allows me to zoom back out and use the swipe feature.

If you are referring to your 'test.htm' page, this may be due to your gallery having dimensions of 640 x 640 (rather than 100% x 100% which would fill the user's browser window).
You could also try scaling your web page for mobile devices by adding the following <meta> tag to the <head> section of your page:

<meta name="viewport" content="width=device-width, initial-scale=1">
Steven Speirs
SimpleViewer Support Team.