Version bump 2.0.3 - course card attributes on the right now expand to up to 200dp, necessary declarations for notifications are now only made when a notification is requested

This commit is contained in:
Deniz Düzgören
2019-06-04 09:27:54 +02:00
parent d4cef4f25d
commit 3ba38c2dfe
6 changed files with 43 additions and 33 deletions
@@ -7,6 +7,7 @@ import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.content.res.Configuration
import android.graphics.BitmapFactory
import android.net.ConnectivityManager
import android.net.NetworkInfo
@@ -90,6 +91,21 @@ class Main : AppCompatActivity(R.layout.activity_main) {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
window.navigationBarColor = ContextCompat.getColor(this, R.color.background)
}
// else -> {
// when (context.resources.configuration.uiMode) {
// Configuration.UI_MODE_NIGHT_YES, Configuration.UI_MODE_NIGHT_UNDEFINED -> {
// AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
// window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
// window.navigationBarColor = ContextCompat.getColor(this, R.color.background)
// }
// }
// Configuration.UI_MODE_NIGHT_NO -> {
// AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
// window.navigationBarColor = ContextCompat.getColor(this, R.color.background)
// }
// }
// } // TODO theming based on system settings for Android Q
}
val bm = BitmapFactory.decodeResource(resources, R.mipmap.ic_launcher)