Skip to content

Commit

Permalink
Fixes #1070 - Large fonts on android
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Jan 12, 2020
1 parent 2396cda commit 705993d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
9 changes: 9 additions & 0 deletions IsraelHiking.Web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions IsraelHiking.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-inappbrowser": "^3.2.0",
"cordova-plugin-ionic-webview": "^4.1.1",
"cordova-plugin-network-information": "git+https://github.com/apache/cordova-plugin-network-information.git",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4",
Expand All @@ -63,6 +64,7 @@
"ngx-store": "2.1.0",
"ngx-window-token": "2.0.1",
"ohauth": "1.0.0",
"phonegap-plugin-mobile-accessibility": "^1.0.5",
"piexifjs": "1.0.6",
"pouchdb": "7.1.1",
"redux": "4.0.1",
Expand Down Expand Up @@ -164,12 +166,13 @@
},
"cordova-plugin-statusbar": {},
"cordova-plugin-brightness": {},
"cordova-plugin-splashscreen": {}
"cordova-plugin-splashscreen": {},
"phonegap-plugin-mobile-accessibility": {}
},
"platforms": [
"ios",
"android"
]
},
"version": "8.5.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { ApplicationState } from "../models/models";
import { LoggingService } from "./logging.service";

declare var cordova: any;
declare var StatusBar: any;
declare var MobileAccessibility: any;

@Injectable()
export class ScreenService {
Expand All @@ -22,6 +24,11 @@ export class ScreenService {
if (!this.runningContextService.isCordova) {
return;
}
if (this.runningContextService.isIos) {
StatusBar.overlaysWebView(true);
StatusBar.overlaysWebView(false);
}
MobileAccessibility.usePreferredTextZoom(false);
let brightness = cordova.plugins.brightness;
brightness.setKeepScreenOn(true);
brightness.getBrightness((currentBrightness) => this.originalBrightness = currentBrightness);
Expand Down
4 changes: 0 additions & 4 deletions IsraelHiking.Web/sources/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ import { ApplicationModule } from "./application/application.module";
import { environment } from "./environments/environment";
import "hammerjs";

declare var StatusBar: any;

if (environment.production) {
enableProdMode();
}

if (environment.isCordova) {
let onDeviceReady = () => {
window.open = cordova.InAppBrowser.open;
StatusBar.overlaysWebView(true);
StatusBar.overlaysWebView(false);
bootstrapInitializationFunction();
};
document.addEventListener("deviceready", onDeviceReady, false);
Expand Down

0 comments on commit 705993d

Please sign in to comment.