feat(android): androidX support (#7039)

* feat: migrate support library namespaces to androidX

* feat(tns-platform-declarations): update to androidX typings

* chore(tests): migrate test apps to AndroidX

* chore(tns-platform-declarations): update tsconfig to include androidx dts files

* update package.json to androidx

* chore(androidx): migrate forgotten support library namspaces

* feat(tns-core-modules-widgets): migrate to AndroidX namespaces

* chore(utils): update androidx namspace for getPaletteColor method

* chore(apps): update tns-platform-declarations package

* Update package.json
This commit is contained in:
Alexander Djenkov
2019-06-10 09:21:41 +03:00
committed by GitHub
parent 0a4b813430
commit c5db112b8d
60 changed files with 142022 additions and 126742 deletions

View File

@@ -119,7 +119,7 @@ export module ad {
if (nativeView instanceof android.view.View) {
windowToken = nativeView.getWindowToken()
} else if (androidApp.foregroundActivity instanceof android.support.v7.app.AppCompatActivity) {
} else if (androidApp.foregroundActivity instanceof androidx.appcompat.app.AppCompatActivity) {
const decorView = androidApp.foregroundActivity.getWindow().getDecorView();
windowToken = decorView ? decorView.getWindowToken() : null;
}
@@ -183,7 +183,7 @@ export module ad {
let result = 0;
try {
if (!attr) {
attr = java.lang.Class.forName("android.support.v7.appcompat.R$attr")
attr = java.lang.Class.forName("androidx.appcompat.R$attr")
}
let colorID = 0;
@@ -335,7 +335,7 @@ Applications cannot access internal storage of other application on Android (see
const providerName = `${context.getPackageName()}.provider`;
traceWrite(`fully-qualified provider name [${providerName}]`, traceCategories.Debug);
const apkURI = android.support.v4.content.FileProvider.getUriForFile(
const apkURI = androidx.core.content.FileProvider.getUriForFile(
context,
providerName,
new java.io.File(filePath),