Android White Background when keyboard fades away

后端 未结 7 1097
遥遥无期
遥遥无期 2021-02-18 14:34

Video of the problem from a different user but its the same

http://imgur.com/ca2cNZv

I have a background image set as follows :

  .pane {
  backg         


        
相关标签:
7条回答
  • 2021-02-18 14:49

    Open your platform -> app ->src ->AndroidManifest.xml

    Edit

    android:windowSoftInputMode="adjustResize"

    To

    android:windowSoftInputMode="adjustNothing"

    0 讨论(0)
  • 2021-02-18 14:50

    Add the following code in your 'App.js'. add

    $window.addEventListener('native.keyboardhide', function (event) {
        $rootScope.$broadcast('native.keyboardhide', event);
    });
    

    when app.run() method call with $window and $rootScope dependency. also, add

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

    in $ionicPlatform.ready().

    please ensure that your code is updated by inspecting your app. If it's not updated then try to remove and add platform and rebuild your app.

    0 讨论(0)
  • 2021-02-18 14:56

    Put:

    <style name="AppTheme" parent="AppBaseTheme">
         <item name="android:windowBackground">@drawable/gradient</item>
    </style>
    

    In styles.xml source

    0 讨论(0)
  • 2021-02-18 14:57

    In AndroidManifest.xml file try to set windowSoftInputMode attribute to adjustNothing:

    android:windowSoftInputMode="adjustNothing"
    

    It worked for my Ionic project, avoiding the resize of Cordova webview when soft keyboard is on.

    0 讨论(0)
  • 2021-02-18 14:58

    That is your windowBackground peeking through. You are probably drawing over the white background of your Theme with that teal background. Modify your theme to include a better background color and remove the background from your layout if possible to improve drawing performance.

    <style name="MyAppTheme" parent="Theme.DeviceDefault.NoActionBar">
      ...
      <item name="android:windowBackground">#ff000000</item>
      ...
    </style>
    
    0 讨论(0)
  • 2021-02-18 14:59

    Hey there is a simple workaround for this

    you need to add overflow-scroll="false" to your ion-content this should fix it

    <ion-content class="padding has-header has-footer" overflow-scroll="false">
    

    related topic Ionicforum

    0 讨论(0)
提交回复
热议问题