import { getNativeApp } from '../../application/helpers-common';
class MainScreen {
    initMetrics() {
        const nativeApp = getNativeApp();
        nativeApp.getSystemService(android.content.Context.WINDOW_SERVICE).getDefaultDisplay().getRealMetrics(this._metrics);
    }
    get metrics() {
        if (!this._metrics) {
            this._metrics = new android.util.DisplayMetrics();
            this.initMetrics();
        }
        return this._metrics;
    }
    get widthPixels() {
        return this.metrics.widthPixels;
    }
    get heightPixels() {
        return this.metrics.heightPixels;
    }
    get scale() {
        return this.metrics.density;
    }
    get widthDIPs() {
        return this.metrics.widthPixels / this.metrics.density;
    }
    get heightDIPs() {
        return this.metrics.heightPixels / this.metrics.density;
    }
    _updateMetrics() {
        if (!this._metrics) {
            this._metrics = new android.util.DisplayMetrics();
        }
        this.initMetrics();
    }
}
export class Screen {
}
Screen.mainScreen = new MainScreen();
// This retains compatibility with NS6
export const screen = Screen;
//# sourceMappingURL=index.android.js.map