Sencha image gallery view

为君一笑 提交于 2020-01-03 06:51:05

问题


I am creating a grid(gallery) view to show the images. Application fetch the images from the server and display it in grids. I can create this view using XTemplate and it is giving me appropriate result. My Xtmeplate code is:

tpl:  Ext.create('Ext.XTemplate',
        '<div class="gallery" id="photos">',
        '<tpl for=".">',
        '<img src="{media:this.getURL}{picname}" width="30" height="30"      class="thumbnail" data-fullimage="{media:this.getURL()}{picname}" alt="{description}"/>',
        '</tpl>',
        '</div>',{
            getURL: function(){

               return Gallery.utils.globalVar.getRemoteDirPath();
            }
        })

The problem is that the images are of big size and I want to display them in small thumbnail. So when I run the application on the mobile device, the application becomes very slow and it hanged up. The reason may be because it simultaneously downloading all the images and rendering on the view.

Can anyone suggest the possible solution that how I can fast the process or any different way to do it.

Thanks Ishan jain


回答1:


I agree with @ThinkFloyd the client need not necessarily know or have a say in the mode of implementation especially if it would not have detrimental impact on the outcome. Thinkfloyd presents a very valid and implementation friendly approach, on the other hand, the client is giving you more work than is necessary by insisting that you take this alternate approach. S/he might be willing to compromise if you communicate things to him/her effectively. You only need to have a thumbnails folder within the images folder for the thumbnails images to link to.. I hope you managed resolve it in the end!



来源:https://stackoverflow.com/questions/16978741/sencha-image-gallery-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!