mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-19 21:59:11 +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);
|
||||
// "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
|
||||
mHandler.postDelayed(() -> {
|
||||
mSuggestionStripView.clear();
|
||||
mSuggestionStripView.hideToolbarKeys();
|
||||
mSuggestionStripView.addSuggestionView(inlineSuggestionView);
|
||||
}, 200);
|
||||
mHandler.postDelayed(() -> mSuggestionStripView.setInlineSuggestionsView(inlineSuggestionView), 200);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -269,13 +269,11 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
getContext(), mSuggestedWords, mSuggestionsStrip, this);
|
||||
}
|
||||
|
||||
public void addSuggestionView(final View view) {
|
||||
mSuggestionsStrip.addView(view);
|
||||
}
|
||||
|
||||
public void hideToolbarKeys() {
|
||||
public void setInlineSuggestionsView(final View view) {
|
||||
clear();
|
||||
mToolbarExpandKey.setVisibility(GONE);
|
||||
mPinnedKeys.setVisibility(GONE);
|
||||
mSuggestionsStrip.addView(view);
|
||||
}
|
||||
|
||||
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?
|
||||
public void clear() {
|
||||
private void clear() {
|
||||
mSuggestionsStrip.removeAllViews();
|
||||
if (DEBUG_SUGGESTIONS)
|
||||
removeAllDebugInfoViews();
|
||||
|
@ -293,9 +291,6 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
for (final TextView word : mWordViews) {
|
||||
word.setOnTouchListener(null);
|
||||
}
|
||||
|
||||
mToolbarExpandKey.setVisibility(VISIBLE);
|
||||
mPinnedKeys.setVisibility(VISIBLE);
|
||||
}
|
||||
|
||||
private void removeAllDebugInfoViews() {
|
||||
|
|
Loading…
Add table
Reference in a new issue