Efei001
Efei001

Reputation: 41

Android keyboard pushes content away

I have an Ionic app where i have input buttons but when i press on an input box the keyboard in android pushes everything away. This doesnt happen in iOS.

I have this in my app.js

  $ionicPlatform.ready(function() {

    if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.disableScroll(true);

    }
    if (window.StatusBar) {
      // org.apache.cordova.statusbar required
      StatusBar.styleDefault();
    }
  });

I tried deleting and doing all sorts of things to this piece of code but it didnt work.

Upvotes: 0

Views: 573

Answers (2)

I have the simmilar issue, and it happens on android only. Using this pref name, fixes the issue, but once the keyboard pops out, it shows the phone navbar it messes up the whole app view.

Upvotes: 0

Efei001
Efei001

Reputation: 41

I fixed this by adding

<preference name="Fullscreen" value="true"/> to my config.xml

Upvotes: 2

Related Questions