1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    1
    Vote Rating
    0
    emaman is on a distinguished road

      0  

    Default Unanswered: Fields are jumping on android when the keyboard is raising

    Unanswered: Fields are jumping on android when the keyboard is raising


    Hello,
    On my android application where the keyboard appears, the whole screen is not scrolling up but only the fields are scrolling. This code is working perfectly on iOS and I don't have the same effect : when the keyboard appear the whole screen is scrolling up.
    Here is the code :

    initComponent: function() {


    this.layout = {
    type: 'vbox',
    align: 'stretch'
    },


    this.items = [{
    xtype: 'panel',
    height: 90,
    layout: 'fit',
    html: ''
    + '<div style="position:absolute; width:100%; bottom:10px; text-align:center;">'
    + '<img src="img/logo-300.png" />'
    + '</div>'
    }, {
    flex: 1,
    layout: 'card',
    activeItem: 0,
    defaults: {
    bodyStyle: Ext.is.Phone ? 'padding: 20px;' : 'padding: 20px 200px;',
    },
    dockedItems: [{
    xtype: 'toolbar',
    dock: 'top',
    pack: 'center',
    items:[{
    xtype: 'spacer'
    }, {
    xtype: 'segmentedbutton',
    items: [{
    pressed: true,
    text: '&nbsp;&nbsp;Connexion&nbsp;&nbsp;',
    handler: Ext.createDelegate(this.setActiveCard, this, [0], false)
    }, {
    text: '&nbsp;&nbsp;Inscription&nbsp;&nbsp;',
    handler: Ext.createDelegate(this.setActiveCard, this, [1], false)
    }]
    }, {
    xtype: 'spacer'
    }]
    }],
    items: [{
    xtype: 'formpanel',
    scroll: 'vertical',
    url: API_URL + 'xxxxxx.php',
    loadMask: false,
    submitOnAction: true,
    id: 'form-login',
    defaults: {
    labelWidth: 120,
    autoCorrect: false,
    autoComplete: false,
    useClearIcon: true
    },
    baseParams:{
    PART_ID:Branding.PART_ID,
    DEVICE:UserInfo.DEVICE,
    LDEVICE: navigator.device?(device.name + '/' + device.platform + '/' + device.version)'none/none/none')
    },
    items: [{
    label: 'Identifiant',
    xtype: 'textfield',
    value: (localStorage.getItem('username') || ''),
    name : 'LOGON',
    cls: 'toUpper'
    }, {
    label: 'Mot de passe',
    xtype: 'passwordfield',
    value: '',
    name : 'PASSWD'
    }, {
    label: 'Keep Id',
    xtype: 'togglefield',
    name: 'MEMORIZE',
    labelWidth:200,
    value: (localStorage.getItem('memorize') || 0),
    cls:'field-MEMORIZE'
    }, {
    layout: {
    type: 'hbox'
    },
    items:[{
    xtype: 'button',
    flex: 1,
    text: 'OK',
    scope: this,
    handler: this.login
    }]
    }, {
    html: '<center><span style="color:black; font-size:12px; text-decoration:underline; color:blue">Mot de passe oublié...</span></center>',
    listeners: {
    scope: this,
    afterRender: function(panel) {
    this.mon(panel.body, 'tap', function() {
    openUrl('http://www.xxxxxxx.com/index.htm');
    }, this);
    }
    }
    },
    {
    html: '<center><div style="color:#C4C4C4; font-size:12px">V1.01 © copyright XXXXX 2011</div></center>'
    }],
    listeners


    Thanks for your answer if you have an idea.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3356
    Vote Rating
    751
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Android and iOS handle the keyboard differently. On iOS it works great but Android isn't the best.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    51
    Answers
    7
    Vote Rating
    0
    noromamai is on a distinguished road

      0  

    Default


    It isn't as bad on a real phone. And it helps having Auto Correct and Suggestions turned off for the keyboard in the settings (to make things more bearable during testing on the emulator). The fields don't jump on a real phone (at least the one i am testing on, maybe slower phones are different) because when changing fields the keyboard disappears and reappears quicker than that the fields can move down and up. Also, i noticed things got a bit less jumpy after i removed "scroll: vertical" from the panel, it was still scrollable after that.

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar