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

@@ -1,5 +1,6 @@
package protect.card_locker;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
@@ -21,10 +22,16 @@ public class AboutActivity extends AppCompatActivity
{
private static final String TAG = "Catima";
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(Utils.updateBaseContextLocale(base));
}
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setTitle(R.string.about);
setContentView(R.layout.about_activity);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);