Apply theme after injection

pull/189/head
Alex Baker 12 years ago
parent e6905bd0b5
commit a35b232018

@ -33,8 +33,8 @@ public class FilterShortcutActivity extends InjectingListActivity {
@Override @Override
public void onCreate(Bundle icicle) { public void onCreate(Bundle icicle) {
ThemeService.applyTheme(this);
super.onCreate(icicle); super.onCreate(icicle);
ThemeService.applyTheme(this);
// Set the result to CANCELED unless a filter is selected. // Set the result to CANCELED unless a filter is selected.
setResult(RESULT_CANCELED); setResult(RESULT_CANCELED);

@ -21,9 +21,8 @@ public class TaskEditActivity extends AstridActivity {
*/ */
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
ThemeService.applyTheme(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ThemeService.applyTheme(this);
ActionBar actionBar = getSupportActionBar(); ActionBar actionBar = getSupportActionBar();
setContentView(R.layout.task_edit_wrapper_activity); setContentView(R.layout.task_edit_wrapper_activity);

@ -86,8 +86,9 @@ public class TaskListActivity extends AstridActivity implements OnPageChangeList
*/ */
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
ThemeService.applyTheme(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ThemeService.applyTheme(this);
supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
int contentView = getContentView(); int contentView = getContentView();

@ -34,7 +34,7 @@ public class ThemeService {
activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER); activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);
} }
public static int getTheme() { private static int getTheme() {
String preference = Preferences.getBoolean(R.string.p_use_dark_theme, false) ? THEME_BLACK : THEME_WHITE; String preference = Preferences.getBoolean(R.string.p_use_dark_theme, false) ? THEME_BLACK : THEME_WHITE;
return getStyleForSetting(preference); return getStyleForSetting(preference);
} }

@ -63,9 +63,9 @@ public class WidgetConfigActivity extends InjectingListActivity {
@Override @Override
public void onCreate(Bundle icicle) { public void onCreate(Bundle icicle) {
super.onCreate(icicle);
ThemeService.applyTheme(this); ThemeService.applyTheme(this);
ThemeService.setForceFilterInvert(true); ThemeService.setForceFilterInvert(true);
super.onCreate(icicle);
// Set the result to CANCELED. This will cause the widget host to cancel // Set the result to CANCELED. This will cause the widget host to cancel
// out of the widget placement if they press the back button. // out of the widget placement if they press the back button.

Loading…
Cancel
Save