From f0e0d5ff9a23583622a77058c08e3cb07c349dc1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 10 Nov 2017 21:30:52 +0100 Subject: [PATCH] store state variables on pause --- .../com/simplemobiletools/notes/activities/MainActivity.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt index 3c2e137b..71f6a505 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt @@ -94,6 +94,11 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener { updateTextColors(view_pager) } + override fun onPause() { + super.onPause() + storeStateVariables() + } + override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu, menu) updateMenuTextSize(resources, menu)