Merge "Blinking runnable is created only if text is editable. DO NOT MERGE." into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
893ac28f75
@@ -6541,7 +6541,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void makeBlink() {
|
private void makeBlink() {
|
||||||
if (!mCursorVisible) {
|
if (!mCursorVisible || !isTextEditable()) {
|
||||||
if (mBlink != null) {
|
if (mBlink != null) {
|
||||||
mBlink.removeCallbacks(mBlink);
|
mBlink.removeCallbacks(mBlink);
|
||||||
}
|
}
|
||||||
@@ -6932,7 +6932,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
* @return True iff this TextView contains a text that can be edited.
|
* @return True iff this TextView contains a text that can be edited.
|
||||||
*/
|
*/
|
||||||
private boolean isTextEditable() {
|
private boolean isTextEditable() {
|
||||||
return mText instanceof Editable && onCheckIsTextEditor();
|
return mText instanceof Editable && onCheckIsTextEditor() && isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user