Make TextView.isSingleLine public

Bug: 117521096
Test: Added new CTS tests under cts.TextViewTest
Test: atest CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: Ib19277767c69fb2bf92d2387738dbb228f31f502
This commit is contained in:
qqd
2018-11-28 15:02:00 -08:00
committed by Qingqing Deng
parent b6005f9ee9
commit 153257115a
2 changed files with 8 additions and 2 deletions

View File

@@ -55578,6 +55578,7 @@ package android.widget {
method public boolean isElegantTextHeight();
method public boolean isFallbackLineSpacing();
method public boolean isInputMethodTarget();
method public boolean isSingleLine();
method public boolean isSuggestionsEnabled();
method public boolean isTextSelectable();
method public int length();

View File

@@ -6254,8 +6254,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return mHint;
}
@UnsupportedAppUsage
boolean isSingleLine() {
/**
* Returns if the text is constrained to a single horizontally scrolling line ignoring new
* line characters instead of letting it wrap onto multiple lines.
*
* @attr ref android.R.styleable#TextView_singleLine
*/
public boolean isSingleLine() {
return mSingleLine;
}