Fixed several theming issues with the new action bar library

pull/14/head
Sam Bosley 12 years ago
parent a4f92a6446
commit 2a28937a65

@ -165,10 +165,11 @@ public class TagSettingsActivity extends SherlockFragmentActivity {
setTheme(ThemeService.getDialogTheme());
else {
ThemeService.applyTheme(this);
ActionBar actionBar = getSupportActionBar();
if (ThemeService.getUnsimplifiedTheme() == R.style.Theme_White_Alt)
getTheme().applyStyle(R.style.SaveAsBackWhite, true);
actionBar.setLogo(R.drawable.ic_menu_save_blue_alt);
else
getTheme().applyStyle(R.style.SaveAsBack, true);
actionBar.setLogo(R.drawable.ic_menu_save);
}
}

@ -47,16 +47,24 @@
<item name="asHeaderTextColorInverse">?attr/asAbBackgroundColor</item>
<!-- actionbar-styling -->
<item name="actionBarStyle">@style/AstridActionBarStyle</item>
<item name="vpiTabPageIndicatorStyle">@style/CustomTabPageIndicator</item>
<item name="vpiTabTextStyle">@style/CustomTabPageIndicator.Text</item>
</style>
<style name="AstridActionBarStyle" parent="@style/Widget.Sherlock.ActionBar">
<item name="background">@drawable/header_blue</item>
<item name="displayOptions">useLogo|showHome|showTitle</item>
<item name="logo">@drawable/home_button_blue</item>
<item name="vpiTabPageIndicatorStyle">@style/CustomTabPageIndicator</item>
<item name="vpiTabTextStyle">@style/CustomTabPageIndicator.Text</item>
</style>
<style name="AstridActionBarStyle.Transparent">
<item name="background">#aa000000</item>
</style>
<style name="Theme.Transparent" parent="Theme">
<item name="asContentBackground">#22000000</item>
<item name="background">#aa000000</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.Transparent</item>
<item name="asQuickaddBackgroundColor">#22000000</item>
<item name="asEditBackground">#33272327</item>
<item name="asEditRowBackground">@drawable/task_edit_background_transparent_black</item>
@ -66,6 +74,7 @@
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowShowWallpaper">true</item>
</style>
<style name="Theme.White" parent="@style/Theme.Sherlock.Light">
<item name="asContentBackground">@android:color/white</item>
@ -98,6 +107,10 @@
<item name="asReadonlyTaskBackground">#fff6d7</item>
<!-- actionbar-styling -->
<item name="actionBarStyle">@style/AstridActionBarStyle.White</item>
</style>
<style name="AstridActionBarStyle.White">
<item name="background">@drawable/header_red</item>
<item name="displayOptions">useLogo|showHome|showTitle</item>
<item name="logo">@drawable/home_button_red</item>
@ -115,6 +128,10 @@
<item name="asRepeatIcon">@drawable/icn_edit_repeats_dark_blue</item>
<item name="asAbBackgroundColor">#e9e9e9</item>
<item name="asEditTabBackground">@drawable/custom_tab_indicator_dark_blue</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White.Blue</item>
</style>
<style name="AstridActionBarStyle.White.Blue">
<item name="background">@drawable/header_day_blue</item>
<item name="logo">@drawable/home_button_dark_blue</item>
</style>
@ -130,26 +147,34 @@
<item name="asEditTabBackground">@drawable/custom_tab_indicator_alt</item>
<item name="asThemeTextColor">@color/blue_theme_color</item>
<item name="asRepeatIcon">@drawable/icn_edit_repeats_blue</item>
<item name="logo">@drawable/home_button_blue_alt</item>
<item name="background">@drawable/header_blue_alt</item>
<item name="asAbBackgroundColor">#eee</item>
<item name="asHeaderTextColor">@android:color/white</item>
<item name="asHeaderTextColorInverse">?attr/asThemeTextColor</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White.Alt</item>
</style>
<style name="AstridActionBarStyle.White.Alt">
<item name="logo">@drawable/home_button_blue_alt</item>
<item name="background">@drawable/header_blue_alt</item>
</style>
<style name="Theme.TransparentWhite" parent="Theme.White.Blue">
<item name="asContentBackground">#22000000</item>
<item name="background">#aa000000</item>
<item name="asQuickaddBackgroundColor">#22000000</item>
<item name="asEditBackground">#33272327</item>
<item name="asEditRowBackground">@drawable/task_edit_background_transparent_black</item>
<item name="asMembersHeaderBackground">@android:color/transparent</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White.Blue.Transparent</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowShowWallpaper">true</item>
</style>
<style name="AstridActionBarStyle.White.Blue.Transparent">
<item name="background">#aa000000</item>
</style>
<style name="Theme.FullTransparent" parent="@style/Theme.Sherlock">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
@ -157,13 +182,6 @@
<item name="android:backgroundDimEnabled">false</item>
<item name="android:windowIsFloating">true</item>
</style>
<style name="SaveAsBack">
<item name="logo">@drawable/ic_menu_save</item>
</style>
<style name="SaveAsBackWhite">
<item name="logo">@drawable/ic_menu_save_blue_alt</item>
</style>
<style name="Theme.Dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@null</item>
@ -179,9 +197,7 @@
<item name="asMembersHeaderBackground">#d0d0d0</item>
<item name="asSeparatorBackground">#888888</item>
<!-- actionbar-styling -->
<item name="background">@drawable/header_background</item>
<item name="displayOptions">useLogo|showHome|showTitle</item>
<item name="logo">@drawable/icon_48</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.Dialog</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowBackground">@drawable/panel_background</item>
@ -201,6 +217,12 @@
<item name="asThemeTextColor">@color/blue_theme_color</item>
</style>
<style name="AstridActionBarStyle.Dialog">
<item name="background">@drawable/header_background</item>
<item name="displayOptions">useLogo|showHome|showTitle</item>
<item name="logo">@drawable/icon_48</item>
</style>
<style name="Theme.Dialog.White">
<item name="asContentBackground">@android:color/white</item>
<item name="asHeaderButtonBackground">@drawable/header_button_white</item>
@ -211,14 +233,18 @@
<item name="asFilterHeaderBackground">@drawable/edit_titlebar_white</item>
<item name="asMembersHeaderBackground">#d0d0d0</item>
<!-- actionbar-styling -->
<item name="background">@android:color/white</item>
<item name="displayOptions">useLogo|showHome|showTitle</item>
<item name="logo">@drawable/icon_48</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.Dialog.White</item>
<item name="asEditBackground">#dddddd</item>
<item name="asEditRowBackground">@drawable/task_edit_background_transparent_white</item>
<item name="asThemeTextColor">@color/blue_theme_color</item>
</style>
<style name="AstridActionBarStyle.Dialog.White">
<item name="background">@android:color/white</item>
<item name="displayOptions">useLogo|showHome|showTitle</item>
<item name="logo">@drawable/icon_48</item>
</style>
<!--================================================== General == -->

@ -23,15 +23,15 @@ public class TaskEditActivity extends AstridActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
ThemeService.applyTheme(this);
ActionBar actionBar = getSupportActionBar();
if (ThemeService.getUnsimplifiedTheme() == R.style.Theme_White_Alt)
getTheme().applyStyle(R.style.SaveAsBackWhite, true);
actionBar.setLogo(R.drawable.ic_menu_save_blue_alt);
else
getTheme().applyStyle(R.style.SaveAsBack, true);
actionBar.setLogo(R.drawable.ic_menu_save);
super.onCreate(savedInstanceState);
setContentView(R.layout.task_edit_wrapper_activity);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowTitleEnabled(false);

Loading…
Cancel
Save