diff options
-rw-r--r-- | api/current.txt | 7 | ||||
-rw-r--r-- | api/system-current.txt | 7 | ||||
-rw-r--r-- | core/java/android/widget/TextView.java | 65 | ||||
-rw-r--r-- | core/res/res/values/attrs.xml | 10 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 5 |
5 files changed, 12 insertions, 82 deletions
diff --git a/api/current.txt b/api/current.txt index 3fd4fcb..ac16571 100644 --- a/api/current.txt +++ b/api/current.txt @@ -215,6 +215,8 @@ package android { public static final class R.attr { ctor public R.attr(); + field public static final int __removeBeforeMRelease_leftIndents = 16844016; // 0x10104f0 + field public static final int __removeBeforeMRelease_rightIndents = 16844017; // 0x10104f1 field public static final int __reserved0 = 16844020; // 0x10104f4 field public static final int __reserved1 = 16844019; // 0x10104f3 field public static final int __reserved2 = 16843999; // 0x10104df @@ -801,7 +803,6 @@ package android { field public static final int layout_x = 16843135; // 0x101017f field public static final int layout_y = 16843136; // 0x1010180 field public static final int left = 16843181; // 0x10101ad - field public static final int leftIndents = 16844016; // 0x10104f0 field public static final int letterSpacing = 16843958; // 0x10104b6 field public static final int lineSpacingExtra = 16843287; // 0x1010217 field public static final int lineSpacingMultiplier = 16843288; // 0x1010218 @@ -1026,7 +1027,6 @@ package android { field public static final int reversible = 16843851; // 0x101044b field public static final int revisionCode = 16843989; // 0x10104d5 field public static final int right = 16843183; // 0x10101af - field public static final int rightIndents = 16844017; // 0x10104f1 field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093 field public static final int ringtoneType = 16843257; // 0x10101f9 field public static final int rotation = 16843558; // 0x1010326 @@ -41560,7 +41560,6 @@ package android.widget { method public int getInputType(); method public final android.text.method.KeyListener getKeyListener(); method public final android.text.Layout getLayout(); - method public int[] getLeftIndents(); method public float getLetterSpacing(); method public int getLineBounds(int, android.graphics.Rect); method public int getLineCount(); @@ -41583,7 +41582,6 @@ package android.widget { method public android.text.TextPaint getPaint(); method public int getPaintFlags(); method public java.lang.String getPrivateImeOptions(); - method public int[] getRightIndents(); method public int getSelectionEnd(); method public int getSelectionStart(); method public int getShadowColor(); @@ -41663,7 +41661,6 @@ package android.widget { method public void setImeActionLabel(java.lang.CharSequence, int); method public void setImeOptions(int); method public void setIncludeFontPadding(boolean); - method public void setIndents(int[], int[]); method public void setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public void setInputType(int); method public void setKeyListener(android.text.method.KeyListener); diff --git a/api/system-current.txt b/api/system-current.txt index 25ef6be..d31a277 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -290,6 +290,8 @@ package android { public static final class R.attr { ctor public R.attr(); + field public static final int __removeBeforeMRelease_leftIndents = 16844016; // 0x10104f0 + field public static final int __removeBeforeMRelease_rightIndents = 16844017; // 0x10104f1 field public static final int __reserved0 = 16844020; // 0x10104f4 field public static final int __reserved1 = 16844019; // 0x10104f3 field public static final int __reserved2 = 16843999; // 0x10104df @@ -876,7 +878,6 @@ package android { field public static final int layout_x = 16843135; // 0x101017f field public static final int layout_y = 16843136; // 0x1010180 field public static final int left = 16843181; // 0x10101ad - field public static final int leftIndents = 16844016; // 0x10104f0 field public static final int letterSpacing = 16843958; // 0x10104b6 field public static final int lineSpacingExtra = 16843287; // 0x1010217 field public static final int lineSpacingMultiplier = 16843288; // 0x1010218 @@ -1101,7 +1102,6 @@ package android { field public static final int reversible = 16843851; // 0x101044b field public static final int revisionCode = 16843989; // 0x10104d5 field public static final int right = 16843183; // 0x10101af - field public static final int rightIndents = 16844017; // 0x10104f1 field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093 field public static final int ringtoneType = 16843257; // 0x10101f9 field public static final int rotation = 16843558; // 0x1010326 @@ -44150,7 +44150,6 @@ package android.widget { method public int getInputType(); method public final android.text.method.KeyListener getKeyListener(); method public final android.text.Layout getLayout(); - method public int[] getLeftIndents(); method public float getLetterSpacing(); method public int getLineBounds(int, android.graphics.Rect); method public int getLineCount(); @@ -44173,7 +44172,6 @@ package android.widget { method public android.text.TextPaint getPaint(); method public int getPaintFlags(); method public java.lang.String getPrivateImeOptions(); - method public int[] getRightIndents(); method public int getSelectionEnd(); method public int getSelectionStart(); method public int getShadowColor(); @@ -44253,7 +44251,6 @@ package android.widget { method public void setImeActionLabel(java.lang.CharSequence, int); method public void setImeOptions(int); method public void setIncludeFontPadding(boolean); - method public void setIndents(int[], int[]); method public void setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public void setInputType(int); method public void setKeyListener(android.text.method.KeyListener); diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 78b5d5d..c538dc2 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -241,8 +241,6 @@ import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1; * @attr ref android.R.styleable#TextView_fontFeatureSettings * @attr ref android.R.styleable#TextView_breakStrategy * @attr ref android.R.styleable#TextView_hyphenationFrequency - * @attr ref android.R.styleable#TextView_leftIndents - * @attr ref android.R.styleable#TextView_rightIndents */ @RemoteView public class TextView extends View implements ViewTreeObserver.OnPreDrawListener { @@ -559,8 +557,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener private int mBreakStrategy; private int mHyphenationFrequency; - private int[] mLeftIndents; - private int[] mRightIndents; private int mMaximum = Integer.MAX_VALUE; private int mMaxMode = LINES; @@ -1165,16 +1161,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener case com.android.internal.R.styleable.TextView_hyphenationFrequency: mHyphenationFrequency = a.getInt(attr, Layout.HYPHENATION_FREQUENCY_NONE); break; - - case com.android.internal.R.styleable.TextView_leftIndents: - TypedArray margins = res.obtainTypedArray(a.getResourceId(attr, View.NO_ID)); - mLeftIndents = parseDimensionArray(margins); - break; - - case com.android.internal.R.styleable.TextView_rightIndents: - margins = res.obtainTypedArray(a.getResourceId(attr, View.NO_ID)); - mRightIndents = parseDimensionArray(margins); - break; } } a.recycle(); @@ -3095,51 +3081,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } /** - * Set indents. Arguments are arrays holding an indent amount, one per line, measured in - * pixels. For lines past the last element in the array, the last element repeats. - * - * @param leftIndents array of indent values for left margin, in pixels - * @param rightIndents array of indent values for right margin, in pixels - * - * @see #getLeftIndents() - * @see #getRightIndents() - * - * @attr ref android.R.styleable#TextView_leftIndents - * @attr ref android.R.styleable#TextView_rightIndents - */ - public void setIndents(@Nullable int[] leftIndents, @Nullable int[] rightIndents) { - mLeftIndents = leftIndents; - mRightIndents = rightIndents; - if (mLayout != null) { - nullLayouts(); - requestLayout(); - invalidate(); - } - } - - /** - * Get left indents. See {#link setMargins} for more details. - * - * @return left indents - * @see #setIndents(int[], int[]) - * @attr ref android.R.styleable#TextView_leftIndents - */ - public int[] getLeftIndents() { - return mLeftIndents; - } - - /** - * Get right indents. See {#link setMargins} for more details. - * - * @return right indents - * @see #setIndents(int[], int[]) - * @attr ref android.R.styleable#TextView_rightIndents - */ - public int[] getRightIndents() { - return mRightIndents; - } - - /** * Sets font feature settings. The format is the same as the CSS * font-feature-settings attribute: * http://dev.w3.org/csswg/css-fonts/#propdef-font-feature-settings @@ -6685,9 +6626,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener .setIncludePad(mIncludePad) .setBreakStrategy(mBreakStrategy) .setHyphenationFrequency(mHyphenationFrequency); - if (mLeftIndents != null || mRightIndents != null) { - builder.setIndents(mLeftIndents, mRightIndents); - } if (shouldEllipsize) { builder.setEllipsize(mEllipsize) .setEllipsizedWidth(ellipsisWidth) @@ -6776,9 +6714,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener .setIncludePad(mIncludePad) .setBreakStrategy(mBreakStrategy) .setHyphenationFrequency(mHyphenationFrequency); - if (mLeftIndents != null || mRightIndents != null) { - builder.setIndents(mLeftIndents, mRightIndents); - } if (shouldEllipsize) { builder.setEllipsize(effectiveEllipsize) .setEllipsizedWidth(ellipsisWidth) diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index c08d511..f4950e1 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -4384,7 +4384,7 @@ i <enum name="simple" value="0" /> <!-- Line breaking uses high-quality strategy, including hyphenation. --> <enum name="high_quality" value="1" /> - <!-- Line breaking stratgegy balances line lengths. --> + <!-- Line breaking strategy balances line lengths. --> <enum name="balanced" value="2" /> </attr> <!-- Frequency of automatic hyphenation. --> @@ -4398,10 +4398,10 @@ i screens with limited space for text. --> <enum name="full" value="2" /> </attr> - <!-- Array of indents, one dimension value per line, left side. --> - <attr name="leftIndents" format="reference" /> - <!-- Array of indents, one dimension value per line, right side. --> - <attr name="rightIndents" format="reference" /> + <!-- Placeholder for a deleted attribute. This should be removed before M release. --> + <attr name="__removeBeforeMRelease_leftIndents" format="reference" /> + <!-- Placeholder for a deleted attribute. This should be removed before M release. --> + <attr name="__removeBeforeMRelease_rightIndents" format="reference" /> </declare-styleable> <declare-styleable name="TextViewAppearance"> <!-- Base text color, typeface, size, and style. --> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index bbe27a4..0d3bf58 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2683,8 +2683,9 @@ <public type="attr" name="lockTaskMode" /> - <public type="attr" name="leftIndents" /> - <public type="attr" name="rightIndents" /> + <!-- Placeholder for a removed attribute. Remove this before M release. --> + <public type="attr" name="__removeBeforeMRelease_leftIndents" /> + <public type="attr" name="__removeBeforeMRelease_rightIndents" /> <public type="attr" name="showForAllUsers" /> |