<resources>
-
+
<style name="MyActionButtonStyle" parent="Widget.Sherlock.ActionButton">
<item name="android:minWidth">28dip</item>
- <!--
+ <!--
<item name="android:paddingLeft">0dip</item>
<item name="android:paddingRight">0dip</item>
- -->
+ -->
</style>
<!--
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseThemeLight" parent="Theme.Sherlock.Light">
+
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
<!--
<item name="searchViewSearchIcon">@android:color/transparent</item>
<item name="searchViewCloseIcon">@android:color/transparent</item>
- -->
- <item name="actionButtonStyle">@style/MyActionButtonStyle</item>
+ -->
+ <item name="actionButtonStyle">@style/MyActionButtonStyle</item>
</style>
-
+
<style name="AppBaseThemeDark" parent="Theme.Sherlock">
<!--
Theme customizations available in newer API levels can go in
Make search icon magnifying glass disappear:
http://stackoverflow.com/questions/13604506/show-actionbarsherlock-searchview-always-expanded
-->
- <!--
+ <!--
<item name="searchViewSearchIcon">@android:color/transparent</item>
<item name="searchViewCloseIcon">@android:color/transparent</item>
- -->
+ -->
<item name="actionButtonStyle">@style/MyActionButtonStyle</item>
</style>
<style name="Theme.Default" parent="AppBaseThemeDark"></style>
<style name="Theme.Default.TokenRow.Fg" parent="Theme.Default">
+
<!-- <item name="android:textColor">#FFFFFF</item> -->
<item name="android:textColorLink">#00AAFF</item>
</style>
<!-- ****************************************************************** -->
+
<!-- Light theme -->
<style name="Theme.Light" parent="AppBaseThemeLight"></style>
<style name="Theme.Light.TokenRow.Fg" parent="Theme.Light">
+
<!-- <item name="android:textColor">#000000</item> -->
<item name="android:textColorLink">#0000FF</item>
</style>
<color name="theme_light_token_row_main_bg">#EEEEEE</color>
<color name="theme_light_token_row_other_bg">#EEEEEE</color>
<color name="theme_light_normal_row_bg">#FFFFFF</color>
-
<color name="gray">#777777</color>
-
+
<style name="BorderlessButton">
<item name="android:background">@null</item>
<item name="android:paddingLeft">4dip</item>
@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.