diff --git a/app/src/main/java/org/mosad/seil0/projectlaogai/MainActivity.kt b/app/src/main/java/org/mosad/seil0/projectlaogai/MainActivity.kt index 9e282d3..1ef92a1 100644 --- a/app/src/main/java/org/mosad/seil0/projectlaogai/MainActivity.kt +++ b/app/src/main/java/org/mosad/seil0/projectlaogai/MainActivity.kt @@ -26,7 +26,6 @@ import android.app.PendingIntent import android.content.Context import android.content.Intent import android.content.IntentFilter -import android.graphics.Color import android.nfc.NfcAdapter import android.nfc.NfcManager import android.nfc.tech.NfcA @@ -39,6 +38,7 @@ import androidx.core.view.GravityCompat import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentTransaction import com.afollestad.aesthetic.Aesthetic +import com.afollestad.aesthetic.NavigationViewMode import com.google.android.material.navigation.NavigationView import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.app_bar_main.* @@ -50,7 +50,6 @@ import org.mosad.seil0.projectlaogai.controller.PreferencesController.Companion. import org.mosad.seil0.projectlaogai.fragments.* import kotlin.system.measureTimeMillis - // TODO save the current fragment to show it when the app is restarted class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener { @@ -176,21 +175,20 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte // this is executed on the first app start, use this to show tutorial etc. Aesthetic.config { activityTheme(R.style.AppTheme_Light) - colorPrimary(Color.BLACK) - colorPrimaryDark(Color.BLACK) - colorAccent(Color.parseColor("#3f51b5")) apply() } - SettingsFragment().selectCourse(this) - } else { - Aesthetic.config { - colorPrimary(cColorPrimary) - colorPrimaryDark(cColorPrimary) - colorAccent(cColorAccent) - apply() - } + SettingsFragment().selectCourse(this) // FIXME this is not working } + + Aesthetic.config { + colorPrimary(cColorPrimary) + colorPrimaryDark(cColorPrimary) + colorAccent(cColorAccent) + navigationViewMode(NavigationViewMode.SELECTED_ACCENT) + apply() + } + } private fun initForegroundDispatch() {