Rename themes

* Change base 'Theme' to 'Tasks'
* Change White to Light
pull/46/merge
Alex Baker 12 years ago
parent e7d629e365
commit bf654a8de4

@ -87,7 +87,7 @@
<application <application
android:icon="@drawable/icon" android:icon="@drawable/icon"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/Theme" android:theme="@style/Tasks"
android:hardwareAccelerated="false" android:hardwareAccelerated="false"
android:manageSpaceActivity="com.todoroo.astrid.core.OldTaskPreferences"> android:manageSpaceActivity="com.todoroo.astrid.core.OldTaskPreferences">
@ -337,19 +337,19 @@
<activity <activity
android:name="com.todoroo.astrid.core.CustomFilterActivity" android:name="com.todoroo.astrid.core.CustomFilterActivity"
android:theme="@style/Theme.Dialog" /> android:theme="@style/Tasks.Dialog" />
<activity <activity
android:name="com.todoroo.astrid.core.CustomFilterExposer$DeleteActivity" android:name="com.todoroo.astrid.core.CustomFilterExposer$DeleteActivity"
android:theme="@style/Theme.FullTransparent" /> android:theme="@style/Tasks.FullTransparent" />
<activity <activity
android:name="com.todoroo.astrid.tags.TagFilterExposer$DeleteTagActivity" android:name="com.todoroo.astrid.tags.TagFilterExposer$DeleteTagActivity"
android:theme="@style/Theme.FullTransparent" /> android:theme="@style/Tasks.FullTransparent" />
<activity <activity
android:name="com.todoroo.astrid.tags.TagFilterExposer$RenameTagActivity" android:name="com.todoroo.astrid.tags.TagFilterExposer$RenameTagActivity"
android:theme="@style/Theme.FullTransparent" /> android:theme="@style/Tasks.FullTransparent" />
<!-- alarms --> <!-- alarms -->
<receiver android:name="com.todoroo.astrid.alarms.AlarmTaskRepeatListener"> <receiver android:name="com.todoroo.astrid.alarms.AlarmTaskRepeatListener">
@ -369,7 +369,7 @@
<!-- actfm --> <!-- actfm -->
<activity <activity
android:name="com.todoroo.astrid.actfm.ActFmGoogleAuthActivity" android:name="com.todoroo.astrid.actfm.ActFmGoogleAuthActivity"
android:theme="@style/Theme" android:theme="@style/Tasks"
android:configChanges="orientation|keyboardHidden" /> android:configChanges="orientation|keyboardHidden" />
<activity <activity
@ -379,7 +379,7 @@
<activity <activity
android:name="com.todoroo.astrid.actfm.TagSettingsActivityTablet" android:name="com.todoroo.astrid.actfm.TagSettingsActivityTablet"
android:windowSoftInputMode="stateHidden" android:windowSoftInputMode="stateHidden"
android:theme="@style/Theme.Dialog" /> android:theme="@style/Tasks.Dialog" />
<activity <activity
android:name="com.todoroo.astrid.actfm.CommentsActivity" android:name="com.todoroo.astrid.actfm.CommentsActivity"
@ -389,7 +389,7 @@
<activity <activity
android:name="com.todoroo.astrid.gtasks.GtasksListFragment" android:name="com.todoroo.astrid.gtasks.GtasksListFragment"
android:windowSoftInputMode="stateHidden|adjustResize" android:windowSoftInputMode="stateHidden|adjustResize"
android:theme="@style/Theme"> android:theme="@style/Tasks">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -398,7 +398,7 @@
<activity <activity
android:name="com.todoroo.astrid.gtasks.auth.GtasksLoginActivity" android:name="com.todoroo.astrid.gtasks.auth.GtasksLoginActivity"
android:theme="@style/Theme" android:theme="@style/Tasks"
android:configChanges="orientation|keyboardHidden" /> android:configChanges="orientation|keyboardHidden" />
<receiver android:name="com.todoroo.astrid.gtasks.GtasksCustomFilterCriteriaExposer"> <receiver android:name="com.todoroo.astrid.gtasks.GtasksCustomFilterCriteriaExposer">

@ -118,7 +118,7 @@ public class TagSettingsActivity extends SherlockFragmentActivity {
} else { } else {
ThemeService.applyTheme(this); ThemeService.applyTheme(this);
ActionBar actionBar = getSupportActionBar(); ActionBar actionBar = getSupportActionBar();
if(ThemeService.getTheme() == R.style.Theme) { if(ThemeService.getTheme() == R.style.Tasks) {
actionBar.setLogo(R.drawable.ic_action_save_light); actionBar.setLogo(R.drawable.ic_action_save_light);
} else { } else {
actionBar.setLogo(R.drawable.ic_action_save); actionBar.setLogo(R.drawable.ic_action_save);

@ -23,7 +23,7 @@ public class TaskEditActivity extends AstridActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
ThemeService.applyTheme(this); ThemeService.applyTheme(this);
ActionBar actionBar = getSupportActionBar(); ActionBar actionBar = getSupportActionBar();
if(ThemeService.getTheme() == R.style.Theme) { if(ThemeService.getTheme() == R.style.Tasks) {
actionBar.setLogo(R.drawable.ic_action_save_light); actionBar.setLogo(R.drawable.ic_action_save_light);
} else { } else {
actionBar.setLogo(R.drawable.ic_action_save); actionBar.setLogo(R.drawable.ic_action_save);

@ -54,18 +54,18 @@ public class ThemeService {
private static int getStyleForSetting(String setting) { private static int getStyleForSetting(String setting) {
if(THEME_BLACK.equals(setting)) { if(THEME_BLACK.equals(setting)) {
return R.style.Theme; return R.style.Tasks;
} else { } else {
return R.style.Theme_White; return R.style.Tasks_Light;
} }
} }
public static int getThemeColor() { public static int getThemeColor() {
int theme = getTheme(); int theme = getTheme();
switch(theme) { switch(theme) {
case R.style.Theme: case R.style.Tasks:
return R.color.blue_theme_color; return R.color.blue_theme_color;
case R.style.Theme_White: case R.style.Tasks_Light:
default: default:
return R.color.dark_blue_theme_color; return R.color.dark_blue_theme_color;
} }
@ -75,7 +75,7 @@ public class ThemeService {
boolean ics = AndroidUtilities.getSdkVersion() >= 14; boolean ics = AndroidUtilities.getSdkVersion() >= 14;
int themeSetting = getTheme(); int themeSetting = getTheme();
int theme; int theme;
if (themeSetting == R.style.Theme) { if (themeSetting == R.style.Tasks) {
if (ics) { if (ics) {
theme = R.style.TEA_Dialog_ICS; theme = R.style.TEA_Dialog_ICS;
} else { } else {
@ -83,9 +83,9 @@ public class ThemeService {
} }
} else { } else {
if (ics) { if (ics) {
theme = R.style.TEA_Dialog_White_ICS; theme = R.style.TEA_Dialog_Light_ICS;
} else { } else {
theme = R.style.TEA_Dialog_White; theme = R.style.TEA_Dialog_Light;
} }
} }
return theme; return theme;
@ -94,10 +94,10 @@ public class ThemeService {
public static int getDialogTheme() { public static int getDialogTheme() {
int themeSetting = getTheme(); int themeSetting = getTheme();
int theme; int theme;
if (themeSetting == R.style.Theme) { if (themeSetting == R.style.Tasks) {
theme = R.style.Theme_Dialog; theme = R.style.Tasks_Dialog;
} else { } else {
theme = R.style.Theme_Dialog_White; theme = R.style.Tasks_Dialog_Light;
} }
return theme; return theme;
} }
@ -105,7 +105,7 @@ public class ThemeService {
public static int getDialogTextColor() { public static int getDialogTextColor() {
if (AndroidUtilities.getSdkVersion() >= 11) { if (AndroidUtilities.getSdkVersion() >= 11) {
int theme = getTheme(); int theme = getTheme();
if (theme == R.style.Theme) { if (theme == R.style.Tasks) {
return android.R.color.white; return android.R.color.white;
} else { } else {
return android.R.color.black; return android.R.color.black;
@ -146,7 +146,7 @@ public class ThemeService {
public static int getDrawable(int lightDrawable, int alter) { public static int getDrawable(int lightDrawable, int alter) {
int theme = getTheme(); int theme = getTheme();
boolean darkTheme = theme == R.style.Theme; boolean darkTheme = theme == R.style.Tasks;
switch(alter) { switch(alter) {
case FLAG_FORCE_DARK: case FLAG_FORCE_DARK:
darkTheme = true; darkTheme = true;
@ -205,12 +205,12 @@ public class ThemeService {
return lightDrawable; return lightDrawable;
} }
public static int getDarkVsLight(int resForWhite, int resForDark) { public static int getDarkVsLight(int resForLight, int resForDark) {
int theme = getTheme(); int theme = getTheme();
if (theme == R.style.Theme) { if (theme == R.style.Tasks) {
return resForDark; return resForDark;
} else { } else {
return resForWhite; return resForLight;
} }
} }
public static int getTaskEditDrawable(int regularDrawable, int lightBlueDrawable) { public static int getTaskEditDrawable(int regularDrawable, int lightBlueDrawable) {

@ -310,7 +310,7 @@ public class TasksWidget extends AppWidgetProvider {
private boolean isDarkTheme() { private boolean isDarkTheme() {
int theme = ThemeService.getWidgetTheme(); int theme = ThemeService.getWidgetTheme();
return theme == R.style.Theme; return theme == R.style.Tasks;
} }
/** /**

@ -8,7 +8,7 @@
<!-- ========================================================== General --> <!-- ========================================================== General -->
<style name="Theme" parent="@style/Theme.Sherlock"> <style name="Tasks" parent="@style/Theme.Sherlock">
<item name="android:windowBackground">@null</item> <item name="android:windowBackground">@null</item>
<item name="asContentBackground">@android:color/black</item> <item name="asContentBackground">@android:color/black</item>
<item name="asTextColor">#ffffff</item> <item name="asTextColor">#ffffff</item>
@ -61,7 +61,7 @@
<item name="android:src">@drawable/ic_action_overflow_light</item> <item name="android:src">@drawable/ic_action_overflow_light</item>
</style> </style>
<style name="Theme.White" parent="@style/Theme.Sherlock.Light"> <style name="Tasks.Light" parent="@style/Theme.Sherlock.Light">
<item name="asContentBackground">@android:color/white</item> <item name="asContentBackground">@android:color/white</item>
<item name="asEditBackground">#e5e5e5</item> <item name="asEditBackground">#e5e5e5</item>
<item name="asTextColor">#000000</item> <item name="asTextColor">#000000</item>
@ -86,28 +86,28 @@
<item name="drawer_background">#efefef</item> <item name="drawer_background">#efefef</item>
<item name="drawer_text">#000</item> <item name="drawer_text">#000</item>
<!-- actionbar-styling --> <!-- actionbar-styling -->
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.White</item> <item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.Light</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White</item> <item name="actionBarStyle">@style/AstridActionBarStyle.Light</item>
<item name="android:actionOverflowButtonStyle">@style/AstridOverflowStyle.White</item> <item name="android:actionOverflowButtonStyle">@style/AstridOverflowStyle.Light</item>
<item name="actionOverflowButtonStyle">@style/AstridOverflowStyle.White</item> <item name="actionOverflowButtonStyle">@style/AstridOverflowStyle.Light</item>
</style> </style>
<style name="AstridV11ActionBarStyle.White"> <style name="AstridV11ActionBarStyle.Light">
<item name="android:displayOptions">showHome|showTitle</item> <item name="android:displayOptions">showHome|showTitle</item>
<item name="android:background">@drawable/header_day_blue</item> <item name="android:background">@drawable/header_day_blue</item>
</style> </style>
<style name="AstridActionBarStyle.White"> <style name="AstridActionBarStyle.Light">
<item name="displayOptions">showHome|showTitle</item> <item name="displayOptions">showHome|showTitle</item>
<item name="background">@drawable/header_day_blue</item> <item name="background">@drawable/header_day_blue</item>
</style> </style>
<style name="AstridOverflowStyle.White" parent="Widget.Sherlock.ActionButton.Overflow"> <style name="AstridOverflowStyle.Light" parent="Widget.Sherlock.ActionButton.Overflow">
<item name="android:src">@drawable/ic_action_overflow</item> <item name="android:src">@drawable/ic_action_overflow</item>
</style> </style>
<style name="Theme.FullTransparent" parent="@style/Theme.Sherlock"> <style name="Tasks.FullTransparent" parent="@style/Theme.Sherlock">
<item name="android:windowIsTranslucent">true</item> <item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item> <item name="android:windowContentOverlay">@null</item>
@ -115,7 +115,7 @@
<item name="android:windowIsFloating">true</item> <item name="android:windowIsFloating">true</item>
</style> </style>
<style name="Theme.Dialog" parent="@android:style/Theme.Dialog"> <style name="Tasks.Dialog" parent="@android:style/Theme.Dialog">
<!--<item name="android:windowBackground">@null</item>--> <!--<item name="android:windowBackground">@null</item>-->
<item name="asContentBackground">@android:color/black</item> <item name="asContentBackground">@android:color/black</item>
<item name="asTextColor">#ffffffff</item> <item name="asTextColor">#ffffffff</item>
@ -158,27 +158,27 @@
<item name="displayOptions">showHome|showTitle</item> <item name="displayOptions">showHome|showTitle</item>
</style> </style>
<style name="Theme.Dialog.White"> <style name="Tasks.Dialog.Light">
<item name="asContentBackground">@android:color/white</item> <item name="asContentBackground">@android:color/white</item>
<item name="asTextColor">#ff000000</item> <item name="asTextColor">#ff000000</item>
<item name="asDetailsColor">#ff6666aa</item> <item name="asDetailsColor">#ff6666aa</item>
<item name="asDueDateColor">#878787</item> <item name="asDueDateColor">#878787</item>
<item name="asFilterHeaderColor">#ffffff</item> <item name="asFilterHeaderColor">#ffffff</item>
<!-- actionbar-styling --> <!-- actionbar-styling -->
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.Dialog.White</item> <item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.Dialog.Light</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.Dialog.White</item> <item name="actionBarStyle">@style/AstridActionBarStyle.Dialog.Light</item>
<item name="asEditBackground">#dddddd</item> <item name="asEditBackground">#dddddd</item>
<item name="asEditRowBackground">@drawable/task_edit_background_transparent_white</item> <item name="asEditRowBackground">@drawable/task_edit_background_transparent_white</item>
<item name="asThemeTextColor">@color/blue_theme_color</item> <item name="asThemeTextColor">@color/blue_theme_color</item>
</style> </style>
<style name="AstridV11ActionBarStyle.Dialog.White"> <style name="AstridV11ActionBarStyle.Dialog.Light">
<item name="android:background">@android:color/white</item> <item name="android:background">@android:color/white</item>
<item name="android:displayOptions">showHome|showTitle</item> <item name="android:displayOptions">showHome|showTitle</item>
</style> </style>
<style name="AstridActionBarStyle.Dialog.White"> <style name="AstridActionBarStyle.Dialog.Light">
<item name="background">@android:color/white</item> <item name="background">@android:color/white</item>
<item name="displayOptions">showHome|showTitle</item> <item name="displayOptions">showHome|showTitle</item>
</style> </style>
@ -294,11 +294,11 @@
<item name="android:textSize">18sp</item> <item name="android:textSize">18sp</item>
</style> </style>
<style name="Theme.WhenDialog"> <style name="Tasks.WhenDialog">
<item name="android:windowAnimationStyle">@style/TEA_WhenDialog_Anim</item> <item name="android:windowAnimationStyle">@style/TEA_WhenDialog_Anim</item>
</style> </style>
<style name="Theme.White.WhenDialog"> <style name="Tasks.Light.WhenDialog">
<item name="android:windowAnimationStyle">@style/TEA_WhenDialog_Anim</item> <item name="android:windowAnimationStyle">@style/TEA_WhenDialog_Anim</item>
</style> </style>
@ -318,7 +318,7 @@
<item name="asTextColor">#ffffff</item> <item name="asTextColor">#ffffff</item>
</style> </style>
<style name="TEA_Dialog.White"> <style name="TEA_Dialog.Light">
<item name="android:windowBackground">@drawable/dialog_full_holo_light</item> <item name="android:windowBackground">@drawable/dialog_full_holo_light</item>
<item name="asTextColor">#000000</item> <item name="asTextColor">#000000</item>
</style> </style>
@ -333,7 +333,7 @@
<item name="asTextColor">#ffffff</item> <item name="asTextColor">#ffffff</item>
</style> </style>
<style name="TEA_Dialog_White_ICS" parent="@android:style/Theme.Holo.Light.Dialog"> <style name="TEA_Dialog_Light_ICS" parent="@android:style/Theme.Holo.Light.Dialog">
<item name="android:windowFrame">@null</item> <item name="android:windowFrame">@null</item>
<item name="android:windowTitleStyle">@style/TEA_DialogWindowTitle</item> <item name="android:windowTitleStyle">@style/TEA_DialogWindowTitle</item>
<item name="android:windowIsFloating">true</item> <item name="android:windowIsFloating">true</item>

Loading…
Cancel
Save