force refresh after lang change

This commit is contained in:
Milos Kozak 2016-06-27 20:23:07 +02:00
parent aa6c5764c4
commit b6970fb5e7

View file

@ -55,6 +55,9 @@ public class MainActivity extends AppCompatActivity {
if (Config.logFunctionCalls) if (Config.logFunctionCalls)
log.debug("onCreate"); log.debug("onCreate");
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
if (pluginsList == null) { if (pluginsList == null) {
pluginsList = new ArrayList<PluginBase>(); pluginsList = new ArrayList<PluginBase>();
// Register all tabs in app here // Register all tabs in app here
@ -72,8 +75,6 @@ public class MainActivity extends AppCompatActivity {
pluginsList.add(SourceXdripFragment.newInstance()); pluginsList.add(SourceXdripFragment.newInstance());
pluginsList.add(SourceNSClientFragment.newInstance()); pluginsList.add(SourceNSClientFragment.newInstance());
pluginsList.add(configBuilderFragment = ConfigBuilderFragment.newInstance()); pluginsList.add(configBuilderFragment = ConfigBuilderFragment.newInstance());
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
registerBus(); registerBus();
@ -121,10 +122,12 @@ public class MainActivity extends AppCompatActivity {
break; break;
case R.id.en_lang: { case R.id.en_lang: {
LocaleHelper.setLocale(this, "en"); LocaleHelper.setLocale(this, "en");
recreate();
break; break;
} }
case R.id.cs_lang: { case R.id.cs_lang: {
LocaleHelper.setLocale(this, "cs"); LocaleHelper.setLocale(this, "cs");
recreate();
break; break;
} }
case R.id.nav_exit: case R.id.nav_exit: