diff --git a/api/current.txt b/api/current.txt index c7fe3ba7a6598..2845af1a7b832 100644 --- a/api/current.txt +++ b/api/current.txt @@ -2938,7 +2938,7 @@ package android.app { method public final void setSecondaryProgress(int); method public void setTitle(java.lang.CharSequence); method public void setTitle(int); - method public void setTitleColor(int); + method public deprecated void setTitleColor(int); method public void setVisible(boolean); method public final void setVolumeControlStream(int); method public boolean shouldUpRecreateTask(android.content.Intent); @@ -29320,7 +29320,7 @@ package android.view { method public void setLogo(int); method public void setSoftInputMode(int); method public abstract void setTitle(java.lang.CharSequence); - method public abstract void setTitleColor(int); + method public abstract deprecated void setTitleColor(int); method public void setType(int); method public void setUiOptions(int); method public void setUiOptions(int, int); diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 8628ff797f68c..d34b05d63c6da 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -4598,6 +4598,17 @@ public class Activity extends ContextThemeWrapper setTitle(getText(titleId)); } + /** + * Change the color of the title associated with this activity. + *

+ * This method is deprecated starting in API Level 11 and replaced by action + * bar styles. For information on styling the Action Bar, read the Action Bar developer + * guide. + * + * @deprecated Use action bar styles instead. + */ + @Deprecated public void setTitleColor(int textColor) { mTitleColor = textColor; onTitleChanged(mTitle, textColor); diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java index bddfc6382e1b4..11d8d36ce7e93 100644 --- a/core/java/android/view/Window.java +++ b/core/java/android/view/Window.java @@ -996,6 +996,7 @@ public abstract class Window { public abstract void setTitle(CharSequence title); + @Deprecated public abstract void setTitleColor(int textColor); public abstract void openPanel(int featureId, KeyEvent event); diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 5e62fbf2e213a..93f0c1c07e8ea 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -397,6 +397,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } @Override + @Deprecated public void setTitleColor(int textColor) { if (mTitleView != null) { mTitleView.setTextColor(textColor);