@Override
public void onCreate(Bundle savedInstanceState) {
+ // This needs to be before super.onCreate, otherwise ActionbarSherlock
+ // doesn't makes the background of the actionbar white when you're
+ // in the dark theme.
+ setTheme(((DictionaryApplication) getApplication()).getSelectedTheme().themeId);
+
Log.d(LOG, "onCreate:" + this);
super.onCreate(savedInstanceState);
// Don't auto-launch if this fails.
prefs.edit().remove(C.DICT_FILE).commit();
- setTheme(((DictionaryApplication) getApplication()).getSelectedTheme().themeId);
application = (DictionaryApplication) getApplication();
theme = application.getSelectedTheme();
searchView.requestFocus();
// http://stackoverflow.com/questions/2833057/background-listview-becomes-black-when-scrolling
- getListView().setCacheColorHint(0);
+// getListView().setCacheColorHint(0);
}
private void onCreateSetupActionBarAndSearchView() {
});
customSearchView.addView(languageButton);
- searchView = new SearchView(customSearchView.getContext());
+ searchView = new SearchView(getSupportActionBar().getThemedContext());
searchView.setIconifiedByDefault(false);
// searchView.setIconified(false); // puts the magnifying glass in the
// wrong place.