diff options
| author | Raph Levien <raph@google.com> | 2014-08-07 16:07:51 -0700 |
|---|---|---|
| committer | Raph Levien <raph@google.com> | 2014-08-07 18:37:16 -0700 |
| commit | e272a26de16b7eebb6f9e1303254f11544a5d3b8 (patch) | |
| tree | 83509662559917a61332a12cbf68b0a8a5bc3204 /core/java/android/widget/TextView.java | |
| parent | f79aad63085445384086f921a754d872397594c1 (diff) | |
Make letterSpacing and fontFeatureSettings public
We added APIs and TextView xml attributes to give access to letter
spacing and OpenType features. This patch makes these changes part of
the public API.
Bug: 15246510
Bug: 15594400
Change-Id: I7a54cb0da2746304a5c72a687612a279cac652e0
Diffstat (limited to 'core/java/android/widget/TextView.java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index a0f7bafd23a0..b162e549bf2e 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -17,6 +17,7 @@ package android.widget; import android.R; +import android.annotation.Nullable; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; @@ -222,6 +223,8 @@ import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1; * @attr ref android.R.styleable#TextView_imeActionId * @attr ref android.R.styleable#TextView_editorExtras * @attr ref android.R.styleable#TextView_elegantTextHeight + * @attr ref android.R.styleable#TextView_letterSpacing + * @attr ref android.R.styleable#TextView_fontFeatureSettings */ @RemoteView public class TextView extends View implements ViewTreeObserver.OnPreDrawListener { @@ -2702,7 +2705,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * * @see #setLetterSpacing(float) * @see Paint#setLetterSpacing - * @hide */ public float getLetterSpacing() { return mTextPaint.getLetterSpacing(); @@ -2716,7 +2718,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @see Paint#getLetterSpacing * * @attr ref android.R.styleable#TextView_letterSpacing - * @hide */ @android.view.RemotableViewMethod public void setLetterSpacing(float letterSpacing) { @@ -2736,8 +2737,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * * @see #setFontFeatureSettings(String) * @see Paint#setFontFeatureSettings - * @hide */ + @Nullable public String getFontFeatureSettings() { return mTextPaint.getFontFeatureSettings(); } @@ -2747,14 +2748,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * font-feature-settings attribute: * http://dev.w3.org/csswg/css-fonts/#propdef-font-feature-settings * + * @param fontFeatureSettings font feature settings represented as CSS compatible string * @see #getFontFeatureSettings() * @see Paint#getFontFeatureSettings * * @attr ref android.R.styleable#TextView_fontFeatureSettings - * @hide */ @android.view.RemotableViewMethod - public void setFontFeatureSettings(String fontFeatureSettings) { + public void setFontFeatureSettings(@Nullable String fontFeatureSettings) { if (fontFeatureSettings != mTextPaint.getFontFeatureSettings()) { mTextPaint.setFontFeatureSettings(fontFeatureSettings); |
