lundi 29 décembre 2014

Android: Bad List scrolling performance when docked element included (S.T. 2.3.1)

Hi guys,

I have this problem in building Android App using Sencha Touch 2.3.1 and Phonegap.

The list scrolling performs fine on iOS but supremely lags on Android. So I tried things like:



  • Set -webkit-transform on List item to enable GPU acceleration

  • Adjust the scrolling behaviour using list's momentumEasing


None of the above actually works, so I try again removing all other parts out of the app. And when I remove the 'docked: top' titlebar above the list, it runs smoothly again.

My simplified app structure now is:



Code:



/* Remove this titlebar and it will be smooth */
{
docked: 'top',
xtype: 'titlebar',
cls: 'notif-title',
padding: 10,
title: '<span class="title-text">Questions</span>',
items: [
{
xtype: 'image',
src: 'resources/images/logo.png',
height: 40,
width: 40
},
{
xtype: 'image',
itemId: 'user-avatar',
cls: 'user-avatar main',
src: 'resources/images/user-default.png',
height: 40,
width: 40,
align: 'right'
}
]
},
{
xtype: 'carousel',
fullscreen: true,
layout: 'card',
indicator: false,
flex: 1,
activeItem: 0,
hideAnimation: 'fadeOut',
showAnimation: 'fade',
items: [
{
xtype: 'questionlistview'
}
]
}

And the QuestionList Class is

Code:



Ext.define('abc.view.QuestionList', {
extend: 'Ext.Panel',
xtype: 'questionlistview',
requires: [
'Ext.picker.Picker',
'Ext.TitleBar',
'Ext.dataview.List',
'Ext.plugin.ListPaging',
'abc.utils.MyPullRefresh',
'abc.utils.MyListPaging'
],
config: {
layout: 'fit',
items: [
{
xtype: 'list',
itemId: 'listAllQues',
emptyText: 'There is no question available',
store: 'questionstore',
infinite: true,
variableHeights: true,
scrollable: {
direction: 'vertical',
directionLock: true,
},
plugins: [
{
xclass: 'abc.utils.MyPullRefresh',
pullText: 'Pull down for more new questions!'
},
{
xclass: 'abc.utils.MyListPaging',
autoPaging: true,
padding: 10
}
]
}
]
}
});

Is there any body encounter the same problem ? Can any one explain why there is a significant difference in performance in this 2 cases ?



Android: Bad List scrolling performance when docked element included (S.T. 2.3.1)

Aucun commentaire:

Enregistrer un commentaire