Commit c3102d4b authored by Mygod's avatar Mygod

Add savedInstanceState to drawer

parent f828268e
...@@ -203,6 +203,7 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe ...@@ -203,6 +203,7 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
) )
.withOnDrawerItemClickListener(this) .withOnDrawerItemClickListener(this)
.withActionBarDrawerToggle(true) .withActionBarDrawerToggle(true)
.withSavedInstance(savedInstanceState)
.build() .build()
val header = drawer.getHeader val header = drawer.getHeader
...@@ -364,6 +365,11 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe ...@@ -364,6 +365,11 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
super.onStop() super.onStop()
} }
override def onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
drawer.saveInstanceState(outState)
}
override def onDestroy() { override def onDestroy() {
super.onDestroy() super.onDestroy()
app.settings.unregisterOnSharedPreferenceChangeListener(this) app.settings.unregisterOnSharedPreferenceChangeListener(this)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment