mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-20 14:19:08 +00:00
parent
2fffe31a3b
commit
b98a208b69
2 changed files with 5 additions and 14 deletions
|
@ -1347,11 +1347,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
final View inlineSuggestionView = InlineAutofillUtils.createView(inlineSuggestions, mDisplayContext);
|
final View inlineSuggestionView = InlineAutofillUtils.createView(inlineSuggestions, mDisplayContext);
|
||||||
// "normal" suggestions might be determined in parallel when processing MSG_UPDATE_SUGGESTION_STRIP
|
// "normal" suggestions might be determined in parallel when processing MSG_UPDATE_SUGGESTION_STRIP
|
||||||
// so we add a delay to make sure inline suggestions are set only after normal suggestions
|
// so we add a delay to make sure inline suggestions are set only after normal suggestions
|
||||||
mHandler.postDelayed(() -> {
|
mHandler.postDelayed(() -> mSuggestionStripView.setInlineSuggestionsView(inlineSuggestionView), 200);
|
||||||
mSuggestionStripView.clear();
|
|
||||||
mSuggestionStripView.hideToolbarKeys();
|
|
||||||
mSuggestionStripView.addSuggestionView(inlineSuggestionView);
|
|
||||||
}, 200);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,13 +269,11 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
getContext(), mSuggestedWords, mSuggestionsStrip, this);
|
getContext(), mSuggestedWords, mSuggestionsStrip, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSuggestionView(final View view) {
|
public void setInlineSuggestionsView(final View view) {
|
||||||
mSuggestionsStrip.addView(view);
|
clear();
|
||||||
}
|
|
||||||
|
|
||||||
public void hideToolbarKeys() {
|
|
||||||
mToolbarExpandKey.setVisibility(GONE);
|
mToolbarExpandKey.setVisibility(GONE);
|
||||||
mPinnedKeys.setVisibility(GONE);
|
mPinnedKeys.setVisibility(GONE);
|
||||||
|
mSuggestionsStrip.addView(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMoreSuggestionsHeight(final int remainingHeight) {
|
public void setMoreSuggestionsHeight(final int remainingHeight) {
|
||||||
|
@ -283,7 +281,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("ClickableViewAccessibility") // why would "null" need to call View#performClick?
|
@SuppressLint("ClickableViewAccessibility") // why would "null" need to call View#performClick?
|
||||||
public void clear() {
|
private void clear() {
|
||||||
mSuggestionsStrip.removeAllViews();
|
mSuggestionsStrip.removeAllViews();
|
||||||
if (DEBUG_SUGGESTIONS)
|
if (DEBUG_SUGGESTIONS)
|
||||||
removeAllDebugInfoViews();
|
removeAllDebugInfoViews();
|
||||||
|
@ -293,9 +291,6 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
for (final TextView word : mWordViews) {
|
for (final TextView word : mWordViews) {
|
||||||
word.setOnTouchListener(null);
|
word.setOnTouchListener(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
mToolbarExpandKey.setVisibility(VISIBLE);
|
|
||||||
mPinnedKeys.setVisibility(VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeAllDebugInfoViews() {
|
private void removeAllDebugInfoViews() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue