С Nativescript: настройка <item name="android:fitsSystemWindows">true</item>
добавляет высоту панели действий на Android 9.0. Если не установить, SOFT_INPUT_ADJUST_RESIZE не будет работать.
Пример изображения дополнительной высоты, добавленной Nativescript
- Пытался установить ADJUST_PAN
- Пробовал установить ADJUST_RESIZE в main.ts
{
"nativescript": {
"id": "nl.desoftwareontwikkelaar.xxx",
"tns-android": {
"version": "6.0.0"
},
"tns-ios": {
"version": "6.0.1"
}
},
"description": "",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"scripts": {
"lint": "tslint \"src/**/*.ts\""
},
"dependencies": {
"@angular/animations": "8.0.3",
"@angular/common": "8.0.3",
"@angular/compiler": "8.0.3",
"@angular/core": "8.0.3",
"@angular/forms": "8.0.3",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "8.0.3",
"@angular/platform-browser-dynamic": "8.0.3",
"@angular/router": "8.0.3",
"@nota/nativescript-webview-ext": "6.0.0-alpha.2",
"nativescript-advanced-webview": "3.0.2",
"nativescript-angular": "8.0.2",
"nativescript-appversion": "1.4.2",
"nativescript-calendar": "2.1.0",
"nativescript-directions": "1.3.0",
"nativescript-email": "1.5.4",
"nativescript-iqkeyboardmanager": "1.5.1",
"nativescript-mapbox": "4.4.1",
"nativescript-oauth2": "1.4.3",
"nativescript-phone": "1.4.0",
"nativescript-plugin-firebase": "9.0.2",
"nativescript-theme-core": "1.0.6",
"nativescript-ui-listview": "7.0.1",
"nativescript-ui-sidedrawer": "7.0.0",
"nativescript-web-image-cache": "5.0.0",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"tns-core-modules": "6.0.1",
"uglifyjs-webpack-plugin": "2.1.3",
"zone.js": "0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "8.0.3",
"@nativescript/schematics": "0.6.0",
"@ngtools/webpack": "8.0.6",
"codelyzer": "5.1.0",
"nativescript-dev-webpack": "1.0.1",
"tslint": "5.18.0",
"tns-platform-declarations": "6.0.1",
"node-sass": "4.12.0",
"typescript": "3.4.5"
},
"gitHead": "803cec054c44c99eaa59cdc267993e6346f6cb3a",
"readme": "NativeScript Application",
"author": "De Software Ontwikkelaar"
}
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- theme to use FOR launch screen-->
<style name="LaunchScreenThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
<item name="colorPrimary">@color/ns_primary</item>
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
<item name="colorAccent">@color/ns_accent</item>
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:fitsSystemWindows">true</item>
</style>
<style name="LaunchScreenTheme" parent="LaunchScreenThemeBase">
</style>
<!-- theme to use AFTER launch screen is loaded-->
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
<item name="colorPrimary">@color/ns_primary</item>
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
<item name="colorAccent">@color/ns_accent</item>
</style>
<style name="AppTheme" parent="AppThemeBase">
</style>
<!-- theme for action-bar -->
<style name="NativeScriptToolbarStyleBase" parent="Widget.AppCompat.Toolbar">
<item name="android:background">@color/ns_primary</item>
<item name="theme">@style/ThemeOverlay.AppCompat.ActionBar</item>
<item name="popupTheme">@style/ThemeOverlay.AppCompat</item>
</style>
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
</style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android" package="__PACKAGE__" android:versionCode="10005" android:versionName="1.0.5">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:name="com.tns.NativeScriptApplication" android:allowBackup="true" android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/AppTheme">
<activity android:name="com.tns.NativeScriptActivity" android:label="@string/title_activity_kimera" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode" android:theme="@style/LaunchScreenTheme" android:screenOrientation="unspecified" android:windowSoftInputMode="stateAlwaysHidden|adjustResize">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity" />
</application>
</manifest>
Как это выглядит без настройки и каков ожидаемый результат. ADJUST_RESIZE здесь не работает, потому что значение fitsSystemWindows не равно true.
Пример ожидаемого результата и текущего результата без настройки
setFitsSystemWindows(true)
в вашем родном представлении вашего корневого макета вместо того, чтобы применять его к Activity. - person Manoj   schedule 07.08.2019