简体   繁体   中英

Android app not working in kitkat version but working in lesser versions

I have a sencha application which runs fine on Jellybean version. When I tried to run it in Kitkat version, soft keyboard hiding my textfield. To sort out that, I gave android:windowSoftInputMode= "stateVisible|adjustResize" in AndroidManifest file. Though it got sorted, that induced the following bug as shown in the screenshot. View cuts in to halves. Is there any solution for this? Would be really thankful if anybody can help me in that. Thanks!

在此处输入图片说明

We can resolve this bug using javascript, by getting the offset of the element through id and scroll it to that particular offset dynamically

    var panelHeight = Ext.get('panelId').getHeight(); 
    console.log('offset of panel height scrollToFocussedElement : '+panelHeight)           
    var offset = document.getElementById('elementId').offsetTop;
    if (navigator.userAgent.toLowerCase().match('android')) {                                        
        offset = offset + panelHeight;
    }
    console.log('offset in scrollToFocussedElement : '+offset);
    Ext.getCmp('viewId').getScrollable().getScroller().scrollTo(0, offset);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM