rahuldas
rahuldas

Reputation: 120

Not display the list view on mobile app developed by sencha touch2

I have made a sencha touch app. The app contains list. When I run the app in my computer browser, the list will appear properly. But when I run it on android mobile browser or as a android mobile app the list does not appear. The code as follows:

Model:

Ext.define('Proximity.model.CandidatebestlistModel', {
    extend: 'Ext.data.Model',
    config: {
        store: 'Proximity.store.CandidatebestStore',
        fields: [{
                name: 'id',
                type: 'int'
            },
            {
                name: 'name',
                type: 'string'
            },
            {
                name: 'img',
                type: 'string'
            },
            {
                name: 'designation',
                type: 'string'
            },
            {
                name: 'summary',
                type: 'string'
            },
            {
                name: 'experience',
                type: 'string'
            },
            {
                name: 'industry',
                type: 'string'
            },
            {
                name: 'functionnml',
                type: 'string'
            },
            {
                name: 'role',
                type: 'string'
            }
        ],
        proxy: {
            type: 'ajax',
            url: Proximity.app.baseUrl + '/index.php/candidate/getcandidatebest',
            withCredentials: false,
            useDefaultXhrHeader: false,
            extraParams: {
                "id": localStorage.getItem('id')
            },
            reader: {
                filters: [
                    Ext.create('Ext.util.Filter', {
                        property: 'ind_id',
                        property: 'fun_id',
                        property: 'role_id'
                    })
                ]
            }
        }
    }
});

Store:

Ext.define('Proximity.store.CandidatebestStore', {
    extend: 'Ext.data.Store',
    alias: 'store.candidatebeststore',

    config: {
        model: 'Proximity.model.CandidatebestlistModel',
        autoLoad: true,
        remoteFilter: true,
        storeId: 'candidatebeststore'
    }
});

View:

{
    width: Ext.os.deviceType == 'Phone' ? null : '100%',
    height: Ext.os.deviceType == 'Phone' ? null : '100%',
    xtype: 'list',
    itemId: 'list',
    store: 'candidatebeststore',
    masked: {
        xtype: 'loadmask',
        message: 'Please wait... '
    },
    emptyText: 'No List Item Found',
    disableSelection: false,
    itemTpl: '{name}
    '+
    '{designation} {
        summary
    } {
        experience
    }
    Years Experience '+
    '',
    listeners: {
        select: function(view, record) {
            Proximity.app.getController('CandidatelistController').onDetailsview(record.get('id'));
        }
    }
}

For additional information:-- I place this list inside the tab panel. So Please give me some solution of this problem.

Thank You.

Upvotes: 3

Views: 73

Answers (1)

rahuldas
rahuldas

Reputation: 120

In the following line of codes

width: Ext.os.deviceType == 'Phone' ? null : '100%',
height: Ext.os.deviceType == 'Phone' ? null : '100%',

replace null with '100%'.

Upvotes: 1

Related Questions