aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/org/pacien/tincapp/context/App.kt
blob: 4b7e44e14afd8c707fc3bbd217e76e034b2ecc2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package org.pacien.tincapp.context

import android.app.Application
import android.content.Context

/**
 * @author pacien
 */
class App : Application() {

    override fun onCreate() {
        super.onCreate()
        appContext = applicationContext
    }

    companion object {
        private var appContext: Context? = null
        fun getContext() = appContext!!
        fun getResources() = getContext().resources!!
    }

}