Add locale chooser (#304)

* Add locale chooser

* Prevent AppBundle crashes

* Reload activity on language change

* Make spotBugs happy
This commit is contained in:
Sylvia van Os
2021-08-15 22:18:40 +02:00
committed by GitHub
parent 86be5d1994
commit edba5d5dca
16 changed files with 225 additions and 34 deletions

View File

@@ -50,6 +50,11 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
private View mHelpText;
private View mNoMatchingCardsText;
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(Utils.updateBaseContextLocale(base));
}
private ActionMode.Callback mCurrentActionModeCallback = new ActionMode.Callback()
{
@Override
@@ -179,6 +184,7 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
{
setTheme(R.style.AppTheme_NoActionBar);
super.onCreate(inputSavedInstanceState);
setTitle(R.string.app_name);
setContentView(R.layout.main_activity);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);