From b6970fb5e7c1a8f59f84c8fcf00507410915512a Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 27 Jun 2016 20:23:07 +0200 Subject: [PATCH] force refresh after lang change --- .../main/java/info/nightscout/androidaps/MainActivity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.java b/app/src/main/java/info/nightscout/androidaps/MainActivity.java index 9ac69e3cfe..5d1eaaf274 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.java @@ -55,6 +55,9 @@ public class MainActivity extends AppCompatActivity { if (Config.logFunctionCalls) log.debug("onCreate"); + toolbar = (Toolbar) findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + if (pluginsList == null) { pluginsList = new ArrayList(); // Register all tabs in app here @@ -72,8 +75,6 @@ public class MainActivity extends AppCompatActivity { pluginsList.add(SourceXdripFragment.newInstance()); pluginsList.add(SourceNSClientFragment.newInstance()); pluginsList.add(configBuilderFragment = ConfigBuilderFragment.newInstance()); - toolbar = (Toolbar) findViewById(R.id.toolbar); - setSupportActionBar(toolbar); registerBus(); @@ -121,10 +122,12 @@ public class MainActivity extends AppCompatActivity { break; case R.id.en_lang: { LocaleHelper.setLocale(this, "en"); + recreate(); break; } case R.id.cs_lang: { LocaleHelper.setLocale(this, "cs"); + recreate(); break; } case R.id.nav_exit: