【问题标题】:sencha Touch horizontal scroll and Hboxsencha Touch 水平滚动和 Hbox
【发布时间】:2015-04-07 09:24:44
【问题描述】:

您好,对于我面临的难以获得的情况,我几乎不需要帮助。我有一个图像的水平列表视图,我只想在屏幕上显示三个图像并突出显示中心图像。

我尝试了轮播,但只有突出显示的图像可以滚动,我想要水平的平滑滚动。

在水平列表视图顶部使用 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'
                }
           ]
         }
    ]
 });

有人可以帮助解决如何实现这一目标的方案。 非常感谢任何帮助

【问题讨论】:

    标签: css sencha-touch-2 horizontal-scrolling


    【解决方案1】:

    您不需要轮播。 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

    【讨论】:

    • 但我希望中心元素应该突出显示..它应该像中心框架是固定的,图像应该通过框架
    • @teekib:你为此尝试过什么吗?如果是,然后发布。我想这可以通过 css 实现。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-10
    • 2013-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多