来自不同用户的问题视频,但内容相同
https://i.stack.imgur.com/2Jzov.jpg https://i.stack.imgur.com/2Jzov.jpg
我的背景图像设置如下:
.pane {
background-image: url("../img/inner-banner-bg.jpg");
background-repeat: repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
}
在我的 config.xml 中
<preference name="Fullscreen" value="false"/>
现在我遇到的问题是,当我点击完成/搜索后键盘消失时,它会在键盘覆盖的空间过渡期间留下大约 0.5 的白色背景,看起来有点糟糕。
当键盘关闭时,它不会收缩,但会留下白色间隙。如何让键盘不缩小背景后面的视图?
当我设置
<preference name="Fullscreen" value="true"/>
它不会发生。我也在使用 Ionic 插件键盘。
无论如何,我可以使键盘淡入淡出的过渡不显示白色背景吗?
编辑:这是我的安卓设置
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
和我的配置设置
<access launch-external="yes" origin="geo:*"/>
<allow-intent href="geo:*"/>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="4000"/>
<preference name="FadeSplashScreen" value="false"/>
<preference name="ShowSplashScreenSpinner" value="true"/>
<preference name="KeyboardShrinksView" value="false"/>
并在 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"
]
在我的网络视图中,我使用 ion-view 和 ion-content
<ion-view>
<ion-content class="has-header has-tabs">