Added current variable in the Application module (to provide a shortcut to the Application singleton).

This commit is contained in:
atanasovg
2014-05-07 15:50:06 +03:00
parent beba0ae4f4
commit 6e2eae411f
9 changed files with 37 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
import app_module = require("Application/application");
import appModule = require("Application/application");
export enum ImageType {
PNG = 0,
@@ -33,7 +33,7 @@ export class Image {
}
public loadFromResource(name: string): boolean {
var androidApp = app_module.Application.current.android;
var androidApp = appModule.current.android;
var res = androidApp.context.getResources();
if (res) {
var identifier: number = res.getIdentifier(name, 'drawable', androidApp.packageName);