am 8872ca4d: Merge "Remove indents from TextView" into mnc-dev
* commit '8872ca4d558a8546c9c934f32fd37d261a6f32d1': Remove indents from TextView
This commit is contained in:
@@ -215,6 +215,8 @@ package android {
|
|||||||
|
|
||||||
public static final class R.attr {
|
public static final class R.attr {
|
||||||
ctor public 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 __reserved0 = 16844020; // 0x10104f4
|
||||||
field public static final int __reserved1 = 16844019; // 0x10104f3
|
field public static final int __reserved1 = 16844019; // 0x10104f3
|
||||||
field public static final int __reserved2 = 16843999; // 0x10104df
|
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_x = 16843135; // 0x101017f
|
||||||
field public static final int layout_y = 16843136; // 0x1010180
|
field public static final int layout_y = 16843136; // 0x1010180
|
||||||
field public static final int left = 16843181; // 0x10101ad
|
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 letterSpacing = 16843958; // 0x10104b6
|
||||||
field public static final int lineSpacingExtra = 16843287; // 0x1010217
|
field public static final int lineSpacingExtra = 16843287; // 0x1010217
|
||||||
field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
|
field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
|
||||||
@@ -1027,7 +1028,6 @@ package android {
|
|||||||
field public static final int reversible = 16843851; // 0x101044b
|
field public static final int reversible = 16843851; // 0x101044b
|
||||||
field public static final int revisionCode = 16843989; // 0x10104d5
|
field public static final int revisionCode = 16843989; // 0x10104d5
|
||||||
field public static final int right = 16843183; // 0x10101af
|
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 ringtonePreferenceStyle = 16842899; // 0x1010093
|
||||||
field public static final int ringtoneType = 16843257; // 0x10101f9
|
field public static final int ringtoneType = 16843257; // 0x10101f9
|
||||||
field public static final int rotation = 16843558; // 0x1010326
|
field public static final int rotation = 16843558; // 0x1010326
|
||||||
@@ -41569,7 +41569,6 @@ package android.widget {
|
|||||||
method public int getInputType();
|
method public int getInputType();
|
||||||
method public final android.text.method.KeyListener getKeyListener();
|
method public final android.text.method.KeyListener getKeyListener();
|
||||||
method public final android.text.Layout getLayout();
|
method public final android.text.Layout getLayout();
|
||||||
method public int[] getLeftIndents();
|
|
||||||
method public float getLetterSpacing();
|
method public float getLetterSpacing();
|
||||||
method public int getLineBounds(int, android.graphics.Rect);
|
method public int getLineBounds(int, android.graphics.Rect);
|
||||||
method public int getLineCount();
|
method public int getLineCount();
|
||||||
@@ -41592,7 +41591,6 @@ package android.widget {
|
|||||||
method public android.text.TextPaint getPaint();
|
method public android.text.TextPaint getPaint();
|
||||||
method public int getPaintFlags();
|
method public int getPaintFlags();
|
||||||
method public java.lang.String getPrivateImeOptions();
|
method public java.lang.String getPrivateImeOptions();
|
||||||
method public int[] getRightIndents();
|
|
||||||
method public int getSelectionEnd();
|
method public int getSelectionEnd();
|
||||||
method public int getSelectionStart();
|
method public int getSelectionStart();
|
||||||
method public int getShadowColor();
|
method public int getShadowColor();
|
||||||
@@ -41672,7 +41670,6 @@ package android.widget {
|
|||||||
method public void setImeActionLabel(java.lang.CharSequence, int);
|
method public void setImeActionLabel(java.lang.CharSequence, int);
|
||||||
method public void setImeOptions(int);
|
method public void setImeOptions(int);
|
||||||
method public void setIncludeFontPadding(boolean);
|
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 setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
|
||||||
method public void setInputType(int);
|
method public void setInputType(int);
|
||||||
method public void setKeyListener(android.text.method.KeyListener);
|
method public void setKeyListener(android.text.method.KeyListener);
|
||||||
|
|||||||
@@ -290,6 +290,8 @@ package android {
|
|||||||
|
|
||||||
public static final class R.attr {
|
public static final class R.attr {
|
||||||
ctor public 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 __reserved0 = 16844020; // 0x10104f4
|
||||||
field public static final int __reserved1 = 16844019; // 0x10104f3
|
field public static final int __reserved1 = 16844019; // 0x10104f3
|
||||||
field public static final int __reserved2 = 16843999; // 0x10104df
|
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_x = 16843135; // 0x101017f
|
||||||
field public static final int layout_y = 16843136; // 0x1010180
|
field public static final int layout_y = 16843136; // 0x1010180
|
||||||
field public static final int left = 16843181; // 0x10101ad
|
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 letterSpacing = 16843958; // 0x10104b6
|
||||||
field public static final int lineSpacingExtra = 16843287; // 0x1010217
|
field public static final int lineSpacingExtra = 16843287; // 0x1010217
|
||||||
field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
|
field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
|
||||||
@@ -1102,7 +1103,6 @@ package android {
|
|||||||
field public static final int reversible = 16843851; // 0x101044b
|
field public static final int reversible = 16843851; // 0x101044b
|
||||||
field public static final int revisionCode = 16843989; // 0x10104d5
|
field public static final int revisionCode = 16843989; // 0x10104d5
|
||||||
field public static final int right = 16843183; // 0x10101af
|
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 ringtonePreferenceStyle = 16842899; // 0x1010093
|
||||||
field public static final int ringtoneType = 16843257; // 0x10101f9
|
field public static final int ringtoneType = 16843257; // 0x10101f9
|
||||||
field public static final int rotation = 16843558; // 0x1010326
|
field public static final int rotation = 16843558; // 0x1010326
|
||||||
@@ -44171,7 +44171,6 @@ package android.widget {
|
|||||||
method public int getInputType();
|
method public int getInputType();
|
||||||
method public final android.text.method.KeyListener getKeyListener();
|
method public final android.text.method.KeyListener getKeyListener();
|
||||||
method public final android.text.Layout getLayout();
|
method public final android.text.Layout getLayout();
|
||||||
method public int[] getLeftIndents();
|
|
||||||
method public float getLetterSpacing();
|
method public float getLetterSpacing();
|
||||||
method public int getLineBounds(int, android.graphics.Rect);
|
method public int getLineBounds(int, android.graphics.Rect);
|
||||||
method public int getLineCount();
|
method public int getLineCount();
|
||||||
@@ -44194,7 +44193,6 @@ package android.widget {
|
|||||||
method public android.text.TextPaint getPaint();
|
method public android.text.TextPaint getPaint();
|
||||||
method public int getPaintFlags();
|
method public int getPaintFlags();
|
||||||
method public java.lang.String getPrivateImeOptions();
|
method public java.lang.String getPrivateImeOptions();
|
||||||
method public int[] getRightIndents();
|
|
||||||
method public int getSelectionEnd();
|
method public int getSelectionEnd();
|
||||||
method public int getSelectionStart();
|
method public int getSelectionStart();
|
||||||
method public int getShadowColor();
|
method public int getShadowColor();
|
||||||
@@ -44274,7 +44272,6 @@ package android.widget {
|
|||||||
method public void setImeActionLabel(java.lang.CharSequence, int);
|
method public void setImeActionLabel(java.lang.CharSequence, int);
|
||||||
method public void setImeOptions(int);
|
method public void setImeOptions(int);
|
||||||
method public void setIncludeFontPadding(boolean);
|
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 setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
|
||||||
method public void setInputType(int);
|
method public void setInputType(int);
|
||||||
method public void setKeyListener(android.text.method.KeyListener);
|
method public void setKeyListener(android.text.method.KeyListener);
|
||||||
|
|||||||
@@ -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_fontFeatureSettings
|
||||||
* @attr ref android.R.styleable#TextView_breakStrategy
|
* @attr ref android.R.styleable#TextView_breakStrategy
|
||||||
* @attr ref android.R.styleable#TextView_hyphenationFrequency
|
* @attr ref android.R.styleable#TextView_hyphenationFrequency
|
||||||
* @attr ref android.R.styleable#TextView_leftIndents
|
|
||||||
* @attr ref android.R.styleable#TextView_rightIndents
|
|
||||||
*/
|
*/
|
||||||
@RemoteView
|
@RemoteView
|
||||||
public class TextView extends View implements ViewTreeObserver.OnPreDrawListener {
|
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 mBreakStrategy;
|
||||||
private int mHyphenationFrequency;
|
private int mHyphenationFrequency;
|
||||||
private int[] mLeftIndents;
|
|
||||||
private int[] mRightIndents;
|
|
||||||
|
|
||||||
private int mMaximum = Integer.MAX_VALUE;
|
private int mMaximum = Integer.MAX_VALUE;
|
||||||
private int mMaxMode = LINES;
|
private int mMaxMode = LINES;
|
||||||
@@ -1165,16 +1161,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
case com.android.internal.R.styleable.TextView_hyphenationFrequency:
|
case com.android.internal.R.styleable.TextView_hyphenationFrequency:
|
||||||
mHyphenationFrequency = a.getInt(attr, Layout.HYPHENATION_FREQUENCY_NONE);
|
mHyphenationFrequency = a.getInt(attr, Layout.HYPHENATION_FREQUENCY_NONE);
|
||||||
break;
|
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();
|
a.recycle();
|
||||||
@@ -3094,51 +3080,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
return mHyphenationFrequency;
|
return mHyphenationFrequency;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
* Sets font feature settings. The format is the same as the CSS
|
||||||
* font-feature-settings attribute:
|
* font-feature-settings attribute:
|
||||||
@@ -6685,9 +6626,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
.setIncludePad(mIncludePad)
|
.setIncludePad(mIncludePad)
|
||||||
.setBreakStrategy(mBreakStrategy)
|
.setBreakStrategy(mBreakStrategy)
|
||||||
.setHyphenationFrequency(mHyphenationFrequency);
|
.setHyphenationFrequency(mHyphenationFrequency);
|
||||||
if (mLeftIndents != null || mRightIndents != null) {
|
|
||||||
builder.setIndents(mLeftIndents, mRightIndents);
|
|
||||||
}
|
|
||||||
if (shouldEllipsize) {
|
if (shouldEllipsize) {
|
||||||
builder.setEllipsize(mEllipsize)
|
builder.setEllipsize(mEllipsize)
|
||||||
.setEllipsizedWidth(ellipsisWidth)
|
.setEllipsizedWidth(ellipsisWidth)
|
||||||
@@ -6776,9 +6714,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
.setIncludePad(mIncludePad)
|
.setIncludePad(mIncludePad)
|
||||||
.setBreakStrategy(mBreakStrategy)
|
.setBreakStrategy(mBreakStrategy)
|
||||||
.setHyphenationFrequency(mHyphenationFrequency);
|
.setHyphenationFrequency(mHyphenationFrequency);
|
||||||
if (mLeftIndents != null || mRightIndents != null) {
|
|
||||||
builder.setIndents(mLeftIndents, mRightIndents);
|
|
||||||
}
|
|
||||||
if (shouldEllipsize) {
|
if (shouldEllipsize) {
|
||||||
builder.setEllipsize(effectiveEllipsize)
|
builder.setEllipsize(effectiveEllipsize)
|
||||||
.setEllipsizedWidth(ellipsisWidth)
|
.setEllipsizedWidth(ellipsisWidth)
|
||||||
|
|||||||
@@ -4384,7 +4384,7 @@ i
|
|||||||
<enum name="simple" value="0" />
|
<enum name="simple" value="0" />
|
||||||
<!-- Line breaking uses high-quality strategy, including hyphenation. -->
|
<!-- Line breaking uses high-quality strategy, including hyphenation. -->
|
||||||
<enum name="high_quality" value="1" />
|
<enum name="high_quality" value="1" />
|
||||||
<!-- Line breaking stratgegy balances line lengths. -->
|
<!-- Line breaking strategy balances line lengths. -->
|
||||||
<enum name="balanced" value="2" />
|
<enum name="balanced" value="2" />
|
||||||
</attr>
|
</attr>
|
||||||
<!-- Frequency of automatic hyphenation. -->
|
<!-- Frequency of automatic hyphenation. -->
|
||||||
@@ -4398,10 +4398,10 @@ i
|
|||||||
screens with limited space for text. -->
|
screens with limited space for text. -->
|
||||||
<enum name="full" value="2" />
|
<enum name="full" value="2" />
|
||||||
</attr>
|
</attr>
|
||||||
<!-- Array of indents, one dimension value per line, left side. -->
|
<!-- Placeholder for a deleted attribute. This should be removed before M release. -->
|
||||||
<attr name="leftIndents" format="reference" />
|
<attr name="__removeBeforeMRelease_leftIndents" format="reference" />
|
||||||
<!-- Array of indents, one dimension value per line, right side. -->
|
<!-- Placeholder for a deleted attribute. This should be removed before M release. -->
|
||||||
<attr name="rightIndents" format="reference" />
|
<attr name="__removeBeforeMRelease_rightIndents" format="reference" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
<declare-styleable name="TextViewAppearance">
|
<declare-styleable name="TextViewAppearance">
|
||||||
<!-- Base text color, typeface, size, and style. -->
|
<!-- Base text color, typeface, size, and style. -->
|
||||||
|
|||||||
@@ -2683,8 +2683,9 @@
|
|||||||
|
|
||||||
<public type="attr" name="lockTaskMode" />
|
<public type="attr" name="lockTaskMode" />
|
||||||
|
|
||||||
<public type="attr" name="leftIndents" />
|
<!-- Placeholder for a removed attribute. Remove this before M release. -->
|
||||||
<public type="attr" name="rightIndents" />
|
<public type="attr" name="__removeBeforeMRelease_leftIndents" />
|
||||||
|
<public type="attr" name="__removeBeforeMRelease_rightIndents" />
|
||||||
|
|
||||||
<public type="attr" name="showForAllUsers" />
|
<public type="attr" name="showForAllUsers" />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user