PixelDroid-App-Android/app/src/main/java/org/pixeldroid/app/utils/PixelDroidApplication.kt

23 lines
618 B
Kotlin
Raw Normal View History

2021-04-22 11:47:18 +02:00
package org.pixeldroid.app.utils
import android.app.Application
import androidx.preference.PreferenceManager
2022-07-08 23:20:44 +02:00
import com.google.android.material.color.DynamicColors
2024-02-10 18:43:07 +01:00
import dagger.hilt.android.HiltAndroidApp
2020-09-10 22:47:04 +02:00
import org.ligi.tracedroid.TraceDroid
2024-02-10 18:43:07 +01:00
@HiltAndroidApp
class PixelDroidApplication: Application() {
override fun onCreate() {
super.onCreate()
2021-03-16 00:23:10 +01:00
2020-09-10 22:47:04 +02:00
TraceDroid.init(this)
2021-03-16 00:23:10 +01:00
val sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(this)
setThemeFromPreferences(sharedPreferences, resources)
2022-07-08 23:20:44 +02:00
DynamicColors.applyToActivitiesIfAvailable(this)
}
}