trime icon indicating copy to clipboard operation
trime copied to clipboard

`InitializationUi` 引起顯示異常

Open goofyz opened this issue 2 years ago • 4 comments

Describe the bugInitializationUi 顯示時,會有異常顯示,當部署完成後會正常顯示鍵盤。

異常情況:

  • 在某些 app (messages, Google Keep) ,它霸佔很大的一個畫面 (如圖)。
  • 某些 app 會閃一閃再隱藏 (用 Chrome 去 google / bing 或有輸入欄的網頁, 再按輸入欄)

壞疑是 e79e32b07c31fecb2ea0b0133117da5f6951f00d 後引起。

To Reproduce Steps to reproduce the bug:

  1. Kill trime
  2. 到 app 的輸入欄位,顯示 default 輸入法
  3. 轉去 trime
  4. See bug

Expected behavior 顯示「部署UI」又不會阻礙原本 app 的 UI

Log

Screenshots 2024-01-26 08 30 22

Smartphone (please complete the following information):

  • Device: Pixel 4a
  • OS: Android 13
  • Theme: trime

goofyz avatar Jan 26 '24 04:01 goofyz

@goofyz 这个问题应该是由 PR #1196 引进。根据实践和参考其他输入法的做法,如果想要从键盘调起对话框等组件不被遮挡,那么最外面的视图容器(也就是新加的 InputView)必须得是全屏的(特别是在 Android 9)。但是 InitializationUi 本身是独立于 InputView 之外的,和后者存在竞争显示关系,不是很好处理(说实话我觉得这个方案不是很优雅,我更倾向于可以弹个通知来说明正在部署)。

WhiredPlanck avatar Jan 26 '24 06:01 WhiredPlanck

暫時將 InitializationUi 搬進 InputView 可行?

我覺得最好的做法是將 keyboard 相關寫進 DB,之後不用每次都部署 theme files ,可以實時彈出鍵盤。 但這個也要先弄好 theme parsing into obect > persists > read > handle rime deploying.

goofyz avatar Jan 29 '24 04:01 goofyz

暫時將 InitializationUi 搬進 InputView 可行?

我覺得最好的做法是將 keyboard 相關寫進 DB,之後不用每次都部署 theme files ,可以實時彈出鍵盤。 但這個也要先弄好 theme parsing into obect > persists > read > handle rime deploying.

这样很好,但是如今bug还不少,再增加复杂度并不合适,不宜作为当前的开发重心,只要减少重复部署就好。

nopdan avatar Jan 29 '24 04:01 nopdan

#1223 之后部署主题很快了,只在部署方案时弹个 toast 就好了

nopdan avatar Feb 05 '24 03:02 nopdan