trkpt/app/src/main/java/org/y20k/trackbook/Trackbook.kt

52 lines
1.2 KiB
Kotlin
Raw Normal View History

2020-01-02 17:00:37 +00:00
/*
* Trackbook.kt
* Implements the Trackbook class
* Trackbook is the base Application class that sets up day and night theme
*
* This file is part of
* TRACKBOOK - Movement Recorder for Android
*
* Copyright (c) 2016-20 - Y20K.org
* Licensed under the MIT-License
* http://opensource.org/licenses/MIT
*
* Trackbook uses osmdroid - OpenStreetMap-Tools for Android
* https://github.com/osmdroid/osmdroid
*/
package org.y20k.trackbook
import android.app.Application
2020-01-28 16:39:45 +00:00
import org.y20k.trackbook.helpers.AppThemeHelper
2020-01-02 17:00:37 +00:00
import org.y20k.trackbook.helpers.LogHelper
2020-01-28 16:39:45 +00:00
import org.y20k.trackbook.helpers.PreferencesHelper
2020-01-02 17:00:37 +00:00
/*
* Trackbook.class
*/
class Trackbook: Application() {
/* Define log tag */
private val TAG: String = LogHelper.makeLogTag(Trackbook::class.java)
/* Implements onCreate */
override fun onCreate() {
super.onCreate()
LogHelper.v(TAG, "Trackbook application started.")
// set Dark / Light theme state
2020-01-28 16:39:45 +00:00
AppThemeHelper.setTheme(PreferencesHelper.loadThemeSelection(this))
2020-01-02 17:00:37 +00:00
}
/* Implements onTerminate */
override fun onTerminate() {
super.onTerminate()
LogHelper.v(TAG, "Trackbook application terminated.")
}
}