mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-03 13:20:31 +00:00
Don't show dictionary debug info on toolbar (#1644)
This commit is contained in:
parent
4d441e5bdf
commit
82bea7facf
2 changed files with 10 additions and 4 deletions
|
@ -373,7 +373,7 @@ final class SuggestionStripLayoutHelper {
|
||||||
x += wordView.getMeasuredWidth();
|
x += wordView.getMeasuredWidth();
|
||||||
|
|
||||||
if (SuggestionStripView.DEBUG_SUGGESTIONS) {
|
if (SuggestionStripView.DEBUG_SUGGESTIONS) {
|
||||||
layoutDebugInfo(positionInStrip, placerView, x);
|
layoutDebugInfo(positionInStrip, placerView, (int) stripView.getX() + x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return startIndexOfMoreSuggestions;
|
return startIndexOfMoreSuggestions;
|
||||||
|
@ -436,8 +436,7 @@ final class SuggestionStripLayoutHelper {
|
||||||
placerView.addView(debugInfoView);
|
placerView.addView(debugInfoView);
|
||||||
debugInfoView.measure(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
debugInfoView.measure(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
final int infoWidth = debugInfoView.getMeasuredWidth();
|
final int infoWidth = debugInfoView.getMeasuredWidth();
|
||||||
final int y = debugInfoView.getMeasuredHeight();
|
ViewLayoutUtils.placeViewAt(debugInfoView, x - infoWidth, 0, infoWidth, debugInfoView.getMeasuredHeight());
|
||||||
ViewLayoutUtils.placeViewAt(debugInfoView, x - infoWidth, y, infoWidth, debugInfoView.getMeasuredHeight());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getSuggestionWidth(final int positionInStrip, final int maxWidth) {
|
private int getSuggestionWidth(final int positionInStrip, final int maxWidth) {
|
||||||
|
|
|
@ -486,7 +486,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
mSuggestedWords.mIsObsoleteSuggestions, mSuggestedWords.mInputStyle,
|
mSuggestedWords.mIsObsoleteSuggestions, mSuggestedWords.mInputStyle,
|
||||||
mSuggestedWords.mSequenceNumber);
|
mSuggestedWords.mSequenceNumber);
|
||||||
mStartIndexOfMoreSuggestions = mLayoutHelper.layoutAndReturnStartIndexOfMoreSuggestions(
|
mStartIndexOfMoreSuggestions = mLayoutHelper.layoutAndReturnStartIndexOfMoreSuggestions(
|
||||||
getContext(), mSuggestedWords, mSuggestionsStrip, SuggestionStripView.this);
|
getContext(), mSuggestedWords, mSuggestionsStrip, this);
|
||||||
mStripVisibilityGroup.showSuggestionsStrip();
|
mStripVisibilityGroup.showSuggestionsStrip();
|
||||||
// Show the toolbar if no suggestions are left and the "Auto show toolbar" setting is enabled
|
// Show the toolbar if no suggestions are left and the "Auto show toolbar" setting is enabled
|
||||||
if (mSuggestedWords.isEmpty() && Settings.getValues().mAutoShowToolbar){
|
if (mSuggestedWords.isEmpty() && Settings.getValues().mAutoShowToolbar){
|
||||||
|
@ -705,6 +705,13 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
mSuggestionsStrip.setVisibility(VISIBLE);
|
mSuggestionsStrip.setVisibility(VISIBLE);
|
||||||
mPinnedKeys.setVisibility(VISIBLE);
|
mPinnedKeys.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DEBUG_SUGGESTIONS) {
|
||||||
|
for (var view : mDebugInfoViews) {
|
||||||
|
view.setVisibility(mSuggestionsStrip.getVisibility());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mToolbarExpandKey.setScaleX((visible && !locked ? -1f : 1f) * mRtl);
|
mToolbarExpandKey.setScaleX((visible && !locked ? -1f : 1f) * mRtl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue