PhoneGap 应用程序无法一致地显示图像

发布于 2024-12-02 23:17:40 字数 3809 浏览 1 评论 0原文

我已经为 iPhone 和 iPod touch 创建了phonegap 应用程序,尽管我经常在 iPod touch 上测试它。

问题:图像随机显示,否则占位符内会显示问号。我尝试在 iPhone、iPod、桌面浏览器(使用点击事件,而不是触摸)等多个地方运行这个应用程序。其中在 iPod 和桌面浏览器上它似乎运行良好,而在 iPhone 或 iPhone 模拟器上我得到随机图像被破坏。 它是一个图像画廊,因此图像是最重要的。

任何建议或指示表示赞赏。

以下是示例页面代码:

<div  id="galleryRava" >
        <div id="galleryRavaScroll">
            <!--gallery scroll frame-->
            <!-- /header -->
            <div>
                <div id="galleryRavalist">
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="capsicum_rava_masala"><img src="images/sankalp/rava/capsicum_rava_masala.JPG">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Capsicum Rava Masala</span>
                        </a>
                    </div>
                        <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="coconut_rava"><img src="images/sankalp/rava/coconut_rava.jpg">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Coconut Rava</span>
                        </a>
                    </div>
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="crispy_rava"><img src="images/sankalp/rava/crispy_rava.JPG">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Crispy rava</span>
                        </a>
                    </div>
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="kanchipuram_achari_rava"><img src="images/sankalp/rava/kanchipuram_achari_rava.jpg">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Kanchipuram achari rava</span>
                        </a>
                    </div>
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="onion_rava"><img src="images/sankalp/rava/onion_rava.jpg">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Onion Rava</span>
                        </a>
                    </div>
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="udupi_rava"><img src="images/sankalp/rava/udupi_rava.JPG">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Udipi rava</span>
                        </a>
                    </div>
                </div>
                <div class="clear"> <br><br><br></div>
            </div>
            <!-- /content -->
        </div><!--gallery scroll ends here-->
    </div>

I have created phonegap app for iPhone and iPod touch, though i use to test it on iPod touch.

Problem: The images show up randomly, else it would show a question mark within the placeholder. I have tried running this app at several places like iPhone, iPod, desktop browser (with click event, not touch). Out of which on iPod and Desktop browser it seems to run fine, whereas on iPhone or iPhone Simulator I get random images to be broken.
Its an gallery for images, thus images are most important.

Any suggestions or pointers appreciated.

Below is a sample page code:

<div  id="galleryRava" >
        <div id="galleryRavaScroll">
            <!--gallery scroll frame-->
            <!-- /header -->
            <div>
                <div id="galleryRavalist">
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="capsicum_rava_masala"><img src="images/sankalp/rava/capsicum_rava_masala.JPG">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Capsicum Rava Masala</span>
                        </a>
                    </div>
                        <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="coconut_rava"><img src="images/sankalp/rava/coconut_rava.jpg">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Coconut Rava</span>
                        </a>
                    </div>
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="crispy_rava"><img src="images/sankalp/rava/crispy_rava.JPG">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Crispy rava</span>
                        </a>
                    </div>
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="kanchipuram_achari_rava"><img src="images/sankalp/rava/kanchipuram_achari_rava.jpg">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Kanchipuram achari rava</span>
                        </a>
                    </div>
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="onion_rava"><img src="images/sankalp/rava/onion_rava.jpg">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Onion Rava</span>
                        </a>
                    </div>
                    <div class="gallery-item">
                        <a href="#detailPage" >
                        <div class="galleryimage" id="udupi_rava"><img src="images/sankalp/rava/udupi_rava.JPG">
                        </div>
                        <div class="itemJoinBar"></div>
                        <span class="gallerytitle">Udipi rava</span>
                        </a>
                    </div>
                </div>
                <div class="clear"> <br><br><br></div>
            </div>
            <!-- /content -->
        </div><!--gallery scroll ends here-->
    </div>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

弱骨蛰伏 2024-12-09 23:17:40

目前尚不清楚您从哪里加载图像。这些图像是否存储在网上的某处?或者您是否正在尝试访问已存储在设备上的图像?

说有时图像出现有时不出现是否正确?您是否遇到过显示所有图像的情况?或者总是至少缺少一张图像?

It's not immediately clear where you're loading the images from. Are these images stored somewhere, online? Or are you trying to access images that are already stored on the device?

And is it correct to say that sometimes the images show up, and sometimes they do not? Have you had an instance where you've had all the images appear? Or is there always at least one image missing?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文