Updated on 2026-08-14
This commit is contained in:
parent
2a8498e464
commit
1d2b869b46
11 changed files with 77 additions and 8 deletions
41
app/src/main/java/com/tangem/AppController.java
Normal file
41
app/src/main/java/com/tangem/AppController.java
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
package com.tangem;
|
||||
|
||||
import android.app.Application;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
|
||||
public class AppController extends Application {
|
||||
private static final String TAG = "." + AppController.class.getSimpleName();
|
||||
|
||||
/**
|
||||
* A singleton instance of the application class for easy access in other places
|
||||
*/
|
||||
private static AppController sInstance;
|
||||
|
||||
public AppController() {
|
||||
super();
|
||||
}
|
||||
|
||||
static {
|
||||
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
// init the singleton
|
||||
sInstance = this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return singleton instance
|
||||
*/
|
||||
public static synchronized AppController getInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTerminate() {
|
||||
super.onTerminate();
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue