toolbar.setSubtitle(R.string.profile_subitlte_read_only);
fab.hide();
}
+
+ int newProfileTheme = profile.getThemeId();
+ if (newProfileTheme != Colors.profileThemeId) {
+ Log.d("profiles", String.format("profile theme %d → %d", Colors.profileThemeId,
+ newProfileTheme));
+ profileThemeChanged();
+ Colors.profileThemeId = newProfileTheme;
+ }
});
});
findViewById(R.id.btn_add_transaction).setOnClickListener(this::fabNewTransactionClicked);
}
+ private void profileThemeChanged() {
+ setupProfileColors();
+
+ // restart activity to reflect theme change
+ finish();
+ Intent intent = new Intent(this, this.getClass());
+ startActivity(intent);
+ }
@Override
protected void onResume() {
super.onResume();