Loading core/java/android/widget/TextView.java +17 −0 Original line number Diff line number Diff line Loading @@ -8243,6 +8243,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } hideControllers(); if (mSuggestionsPopupWindow != null) { mSuggestionsPopupWindow.onParentLostFocus(); } } startStopMarquee(hasWindowFocus); Loading Loading @@ -9618,6 +9621,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener private SuggestionInfo[] mSuggestionInfos; private int mNumberOfSuggestions; private boolean mCursorWasVisibleBeforeSuggestions; private boolean mIsShowingUp = false; private SuggestionAdapter mSuggestionsAdapter; private final Comparator<SuggestionSpan> mSuggestionSpanComparator; private final HashMap<SuggestionSpan, Integer> mSpansLengths; Loading Loading @@ -9673,6 +9677,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } public boolean isShowingUp() { return mIsShowingUp; } public void onParentLostFocus() { mIsShowingUp = false; } private class SuggestionInfo { int suggestionStart, suggestionEnd; // range of actual suggestion within text SuggestionSpan suggestionSpan; // the SuggestionSpan that this TextView represents Loading Loading @@ -9776,6 +9788,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener updateSuggestions(); mCursorWasVisibleBeforeSuggestions = mCursorVisible; setCursorVisible(false); mIsShowingUp = true; super.show(); } Loading Loading @@ -11188,6 +11201,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } private void hideCursorControllers() { if (mSuggestionsPopupWindow != null && !mSuggestionsPopupWindow.isShowingUp()) { // Should be done before hide insertion point controller since it triggers a show of it mSuggestionsPopupWindow.hide(); } hideInsertionPointCursorController(); stopSelectionActionMode(); } Loading Loading
core/java/android/widget/TextView.java +17 −0 Original line number Diff line number Diff line Loading @@ -8243,6 +8243,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } hideControllers(); if (mSuggestionsPopupWindow != null) { mSuggestionsPopupWindow.onParentLostFocus(); } } startStopMarquee(hasWindowFocus); Loading Loading @@ -9618,6 +9621,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener private SuggestionInfo[] mSuggestionInfos; private int mNumberOfSuggestions; private boolean mCursorWasVisibleBeforeSuggestions; private boolean mIsShowingUp = false; private SuggestionAdapter mSuggestionsAdapter; private final Comparator<SuggestionSpan> mSuggestionSpanComparator; private final HashMap<SuggestionSpan, Integer> mSpansLengths; Loading Loading @@ -9673,6 +9677,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } public boolean isShowingUp() { return mIsShowingUp; } public void onParentLostFocus() { mIsShowingUp = false; } private class SuggestionInfo { int suggestionStart, suggestionEnd; // range of actual suggestion within text SuggestionSpan suggestionSpan; // the SuggestionSpan that this TextView represents Loading Loading @@ -9776,6 +9788,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener updateSuggestions(); mCursorWasVisibleBeforeSuggestions = mCursorVisible; setCursorVisible(false); mIsShowingUp = true; super.show(); } Loading Loading @@ -11188,6 +11201,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } private void hideCursorControllers() { if (mSuggestionsPopupWindow != null && !mSuggestionsPopupWindow.isShowingUp()) { // Should be done before hide insertion point controller since it triggers a show of it mSuggestionsPopupWindow.hide(); } hideInsertionPointCursorController(); stopSelectionActionMode(); } Loading