How can I create an Image viewer like this in sencha touch? -
i need create image viewer in sencha touch. should show thumbnails of images. clicking thumbnails should show enlarged image. i'm newbie in sencha touch. please me.
afaik there no such standard gallery plugin have yourself. can try this:
create container 2 panels in vbox
layout, bigger top panel have image
, lower panel horizontal list
. on itemtap
of list item, can change src
attribute of image
. can create simple list loading data server using store provides both thumbnail & big image url.
i haven't tested should this:
{ xtype : 'panel', layout : 'vbox', items : [{ xtype : 'panel', flex : 5, items : [{ xtype : 'image', id : 'myimg', src : 'http://xyz.com/asdf.jpg' }] },{ xtype : 'panel', items : [{ xtype : 'list', listeners: { itemtap: function(list, index, item, rec) { ext.getcmp("myimg").setsrc(rec.get('bigimgurl')); } } }] }] }
Comments
Post a Comment