1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    4
    Vote Rating
    0
    HustlaS is on a distinguished road

      0  

    Default Answered: List scroll issue

    Answered: List scroll issue


    Hi
    I've a problem with my List. I can't scroll them. The list move down but jump to the top after tapend. I use Sencha touch PR4 and i have test this on Ipad and Google Chrome
    I use this view

    Code:
    Ext.define('TimeShift.view.Activity', {
    extend: 'Ext.Panel', id: 'Activity', alias: 'widget.Activity', layout: 'card', config: {
    items: [
    { xtype: 'list',
    layout: 'card', // fullscreen: true,
    store: 'ActivityStore', scrollable: 'vertical', itemTpl: '<div class="contact">{Purpose}</div>', items: [
    {xtype: 'toolbar',
    docked: 'top', title: 'Aktivitäten'
    }]
    }]
    }, initialize: function () {
    console.log('initialize ActivityList'); this.callParent();
    }
    });

    and this view is in this container

    Code:
    Ext.define('TimeShift.view.ListContainer', {
    extend: 'Ext.Container', id: 'ListContainer', alias: 'widget.ListContainer', cardAnimation: 'slider', scrollable: true, autoDestroy: true, config: {
    items: [
    { xtype: 'Activity' }
    ]
    }, initialize: function () {
    console.log('initialize ListContainer'); this.callParent();
    }
    });

    I hope someone can help me.

  2. The layout configuration applies to a containers items, so if you specify a container with a layout of 'card', it means each of its items will stretch to fit the size of its container.

    The problem here is that you have given a list a layout, which is incorrect. A list will automatically layout its items without needing a layout. If you remove layout: 'card' it will probably fix your issues.

    I'll add code into data view and list to never use the layout configuration.

    Thanks!

  3. #2
    Sencha User
    Join Date
    Dec 2011
    Posts
    56
    Answers
    2
    Vote Rating
    1
    jwjiwon is on a distinguished road

      0  

    Default :)

    :)


    I had the same problem, and I found out that dataview or list is different from other panels.
    they are 'view' so that they need to be just view in itself.
    you can't add it to panel or container right away.


    Making dataview as a main
    and adding no panels to dataview will work
    for example, like this :

    Code:
    Ext.define('TimeShift.view.Activity', {
    extend: 'Ext.dataview.List', 
    id: 'Activity', 
    alias: 'widget.Activity',
    layout: 'card',
    config: {         
     layout: 'card', //    fullscreen: true,                 
    store: 'ActivityStore',                 
    scrollable: 'vertical',                 
    itemTpl: '<div class="contact">{Purpose}</div>',                 
         
    },     
    initialize: function () {         
    console.log('initialize ActivityList');         
    this.callParent();     
    } 
    });
    Code:
    Ext.define('TimeShift.view.ListContainer', {
    	extend: 'Ext.Container',     
    	id: 'ListContainer',     
    	alias: 'widget.ListContainer',      
    	cardAnimation: 'slider',     
    	scrollable: true,     
    	autoDestroy: true,     
    	config: {         
    	items: [              
    	{ xtype: 'Activity' },
    	{ xtype: 'toolbar',                         
         docked: 'top',                         
         title: 'Aktivitäten'   }
    	]      
    	},     
    	initialize: function () {         
    	console.log('initialize ListContainer');         
    	this.callParent();     
    	} 
    });
    I hope this will help you

  4. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    The layout configuration applies to a containers items, so if you specify a container with a layout of 'card', it means each of its items will stretch to fit the size of its container.

    The problem here is that you have given a list a layout, which is incorrect. A list will automatically layout its items without needing a layout. If you remove layout: 'card' it will probably fix your issues.

    I'll add code into data view and list to never use the layout configuration.

    Thanks!
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  5. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    4
    Vote Rating
    0
    HustlaS is on a distinguished road

      0  

    Default


    both reply works but the simplest is..

    delete
    Code:
    layout: 'card';


    thanks for help!

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."