mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-21 09:21:20 +00:00
auto show / hide toolbar (#674)
Co-authored-by: codokie <@> Co-authored-by: Helium314 <helium314@disroot.org> Co-authored-by: Helium314 <helium314@mailbox.org>
This commit is contained in:
parent
c048ff6ff6
commit
b9451e4f09
6 changed files with 63 additions and 5 deletions
|
@ -257,7 +257,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
? km.isDeviceLocked()
|
||||
: km.isKeyguardLocked();
|
||||
mToolbarExpandKey.setOnClickListener(hideToolbarKeys ? null : this);
|
||||
mPinnedKeys.setVisibility(hideToolbarKeys ? GONE : VISIBLE);
|
||||
mPinnedKeys.setVisibility(hideToolbarKeys ? GONE : mSuggestionsStrip.getVisibility());
|
||||
isInlineAutofillSuggestionsVisible = false;
|
||||
}
|
||||
|
||||
|
@ -285,6 +285,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
clear();
|
||||
isInlineAutofillSuggestionsVisible = true;
|
||||
mSuggestionsStrip.addView(view);
|
||||
if (Settings.getInstance().getCurrent().mAutoHideToolbar)
|
||||
setToolbarVisibility(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -482,6 +484,10 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
mStartIndexOfMoreSuggestions = mLayoutHelper.layoutAndReturnStartIndexOfMoreSuggestions(
|
||||
getContext(), mSuggestedWords, mSuggestionsStrip, SuggestionStripView.this);
|
||||
mStripVisibilityGroup.showSuggestionsStrip();
|
||||
// Show the toolbar if no suggestions are left and the "Auto show toolbar" setting is enabled
|
||||
if (mSuggestedWords.isEmpty() && Settings.getInstance().getCurrent().mAutoShowToolbar){
|
||||
setToolbarVisibility(true);
|
||||
}
|
||||
}
|
||||
|
||||
boolean showMoreSuggestions() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue