2015-04-07 93 views
0

嗨,我需要一点帮助,我很难得到的场景。我有一个水平的图像列表视图,我只想在屏幕上显示三个图像,并突出显示中心图像。sencha触摸横向滚动和Hbox

我试着旋转木马,但只有突出显示的图像将滚动,我想横向种类的平滑滚动。

就像在水平列表视图顶部使用hbox面板的作品?

var superpanel = new Ext.Panel({ 
    fullscreen: true, 
    layout: 'hbox',    
    items: [ 
     { 
      xtype: 'panel', 
      id: 'panel_1', 
      width: '100%', 
      layout: 'fit', 
      items: [ 
       { 
        xtype: 'list', 
        flex:1, 
        id: 'list1', 
        store: 'samplestore1' 
       } 
      ] 
     } 
    ] 
}); 

有人可以帮助该场景如何实现这一点。 任何帮助非常感谢

回答

0

你不需要为此转盘。 Dataview将用于此目的。看看这个家伙:

Ext.define('Example.view.HorizontalList', { 
      extend: 'Ext.dataview.DataView', 
      xtype: 'horizontallist', 
      config: { 
       inline: { 
        wrap: false 
       }, 
       scrollable: { 
        direction: 'horizontal' 
       }, 

       //set the itemtpl to show the fields for the store 
       itemTpl: '{name} {image}', 

       //bind the store to this list 
       store: 'xyz' 
      } 
     }); 

你也可以检查this

+0

但我希望中心元素应该突出显示..它应该像中心框架是固定的,图像应该通过框架 – teekib

+0

@teekib:你有尝试过什么吗?如果是的话发布。我想这是可行的通过CSS。 –