Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show the toolbar of LiquidKeyboard every time LiquidKeyboard is started. #1185

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions app/src/main/java/com/osfans/trime/ime/core/Trime.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ public void selectLiquidKeyboard(final int tabIndex) {
mTabRoot.setBackground(mCandidateRoot.getBackground());
mTabRoot.move(tabView.getHightlightLeft(), tabView.getHightlightRight());
}
showLiquidKeyboardToolbar();
} else {
symbolKeyboardType = SymbolKeyboardType.NO_KEY;
// 设置液体键盘处于隐藏状态
Expand Down Expand Up @@ -1109,8 +1110,7 @@ public int updateComposing() {
Timber.d("updateComposing() SymbolKeyboardType=%s", symbolKeyboardType.toString());
if (symbolKeyboardType != SymbolKeyboardType.NO_KEY
&& symbolKeyboardType != SymbolKeyboardType.CANDIDATE) {
mComposition.setWindow();
showCompositionView(false);
showLiquidKeyboardToolbar();
} else {
mComposition.setVisibility(View.VISIBLE);
startNum = mComposition.setWindow(minPopupSize, minPopupCheckSize, Integer.MAX_VALUE);
Expand All @@ -1133,6 +1133,11 @@ public int updateComposing() {
return startNum;
}

private void showLiquidKeyboardToolbar() {
mComposition.changeToLiquidKeyboardToolbar();
showCompositionView(false);
}

public void showDialogAboveInputView(@NonNull final Dialog dialog) {
final IBinder token = inputRootBinding.inputRoot.getWindowToken();
final Window window = dialog.getWindow();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ else if (m.containsKey("candidate")) {
}

/** 设置悬浮窗, 用于liquidKeyboard的悬浮窗工具栏 */
public void setWindow() {
public void changeToLiquidKeyboardToolbar() {
if (getVisibility() != View.VISIBLE) return;
if (liquid_keyboard_window_comp.isEmpty()) {
this.setVisibility(GONE);
Expand Down
Loading