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 {
background-image: url("../img/inner-banner-bg.jpg");
background-repeat: repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
}
And in my config.xml
在我的config.xml中
Now the problem I am having is when the keyboard fades away after I hit done / search, it leaves a white background for like 0.5 during the transition for the space the keyboard covered and it looks a bit bad.
現在我遇到的問題是當我點擊完成/搜索后鍵盤消失時,它會在鍵盤覆蓋的空間過渡期間留下類似0.5的白色背景,看起來有點糟糕。
When the keyboard closes it unshrinks but leaves white gap. How can I get the keyboard to not shrink the view behind the backdrop ?
當鍵盤關閉時,它會不收縮但會留下白色間隙。如何讓鍵盤不縮小背景幕后的視圖?
When I set
我訂的時候
It doesn't happen. I am also using the Ionic Plugin Keyboard.
它不會發生。我也在使用Ionic插件鍵盤。
Anyway I can make the transition of the keyboard fading not display the white background ?
無論如何,我可以使鍵盤褪色的過渡不顯示白色背景?
Edit : Here's my android settings
編輯:這是我的android設置
And my config Settings
和我的配置設置
And in the Package.json
並在Package.json中
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.0.4",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"bower": "^1.3.3",
"gulp-util": "^2.2.14",
"shelljs": "^0.3.0"
},
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"cordova-plugin-geolocation",
"cordova-plugin-network-information",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [
"android",
"ios"
]
In my web view I use ion-view and ion-content
在我的網頁視圖中,我使用離子視圖和離子內容
6 个解决方案
#1
8
In AndroidManifest.xml file try to set windowSoftInputMode attribute to adjustNothing:
在AndroidManifest.xml文件中嘗試將windowSoftInputMode屬性設置為adjustNothing:
android:windowSoftInputMode="adjustNothing"
It worked for my Ionic project, avoiding the resize of Cordova webview when soft keyboard is on.
它適用於我的Ionic項目,避免在打開軟鍵盤時調整Cordova webview的大小。
#2
1
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.
那是你的窗戶背景偷看。您可能正在使用該青色背景繪制主題的白色背景。修改主題以包含更好的背景顏色,並盡可能從布局中刪除背景以提高繪圖性能。
...
#ff000000
...
#3
1
Put:
放:
@drawable/gradient
In styles.xml source
在styles.xml源碼中
#4
0
Hey there is a simple workaround for this
嘿,有一個簡單的解決方法
you need to add overflow-scroll="false" to your ion-content this should fix it
你需要在你的離子內容中添加overflow-scroll =“false”,這應該修復它
related topic Ionicforum
相關主題Ionicforum
#5
0
Its happen because window re size itself to make room for the soft input area
它的發生是因為窗口大小本身為軟輸入區域騰出空間
use android:windowSoftInputMode="adjustNothing" in AndroidManifest.xml
在AndroidManifest.xml中使用android:windowSoftInputMode =“adjustNothing”
..
...
#6
-1
Add the following code in your 'App.js'. add
在“App.js”中添加以下代碼。加
$window.addEventListener('native.keyboardhide', function (event) {
$rootScope.$broadcast('native.keyboardhide', event);
});
when app.run() method call with $window and $rootScope dependency. also, add
當app.run()方法調用$ window和$ rootScope依賴時。還有,補充一下
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
in $ionicPlatform.ready().
在$ 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.
請確保通過檢查您的應用來更新您的代碼。如果沒有更新,請嘗試刪除並添加平台並重建您的應用。