trime icon indicating copy to clipboard operation
trime copied to clipboard

Android 13上選字欄背景爲黑色,候選詞不可見

Open BYVoid opened this issue 1 year ago • 1 comments

Describe the bug The background color of the candidate bar is always black, regardless of the system dark mode. When the font color is also black, nothing is visible.

To Reproduce Steps to reproduce the bug:

  1. Upgrade to Android 13 (Beta)
  2. Type anything

Expected behavior The candidates should be visible.

Screenshots Screenshot_20220812-143015

Smartphone (please complete the following information):

BYVoid avatar Aug 12 '22 21:08 BYVoid

安卓12是一样的

rouvwhqk avatar Aug 29 '22 12:08 rouvwhqk

取色所用的函数/ API 可能在高版本 Android 行为发生了变化,没取到主题颜色所以回落到了预定的黑色。晚些时候排查一下,感谢反馈 ~

WhiredPlanck avatar Sep 29 '22 03:09 WhiredPlanck

遇到同样的问题,求解~

heiher avatar Dec 06 '22 03:12 heiher

3.2.x的原因不清楚,一直在用3.1.3,修复候选词视图不可见问题后现在在Android 13上可用了

https://github.com/heiher/trime/releases/tag/3.1.3.1

a

heiher avatar Dec 07 '22 04:12 heiher

啊…我才剛回在另一個 android 13 的問題上…沒想到你剛好就修掉 android 13 的相容性問題了…方便請教你的修復方式是?

zhihmeng avatar Dec 07 '22 07:12 zhihmeng

啊…我才剛回在另一個 android 13 的問題上…沒想到你剛好就修掉 android 13 的相容性問題了…方便請教你的修復方式是?

对于3.1.3基础代码,在Android 13上表现为Candidate View不可见,而不是像当前Issue中是color问题。不可见的问题我的修复方法是:

https://github.com/heiher/trime/commit/8fe862e737dd4f6d013b4b39312385632a738fe3

heiher avatar Dec 07 '22 07:12 heiher

啊…我才剛回在另一個 android 13 的問題上…沒想到你剛好就修掉 android 13 的相容性問題了…方便請教你的修復方式是?

对于3.1.3基础代码,在Android 13上表现为Candidate View不可见,而不是像当前Issue中是color问题。不可见的问题我的修复方法是:

heiher@8fe862e

了解…感謝回覆…看起來是一樣的方式…就是不懂為什麼會需要這樣就是了…XD

zhihmeng avatar Dec 07 '22 08:12 zhihmeng

Please try the latest Github build, advice from user's comment.

Bambooin avatar Dec 07 '22 14:12 Bambooin

啊…我才剛回在另一個 android 13 的問題上…沒想到你剛好就修掉 android 13 的相容性問題了…方便請教你的修復方式是?

对于3.1.3基础代码,在Android 13上表现为Candidate View不可见,而不是像当前Issue中是color问题。不可见的问题我的修复方法是: heiher@8fe862e

了解…感謝回覆…看起來是一樣的方式…就是不懂為什麼會需要這樣就是了…XD

用了几天,发现这个workaround方法也不是特别可靠,有时还是会出现候选栏不可见(布局空间还占用的invisible状态)的情况,需要切换到其它输入法再换回来才能恢复正常。

在测试另一个workaround方法:https://github.com/heiher/trime/commit/6b98eb2418ea95fa252c6018bf53d89c75374e90

正规解法得分析framework里的InputMethodService了,有时间再看看,先保证基本能用再说吧。:P

heiher avatar Dec 10 '22 14:12 heiher

啊…我才剛回在另一個 android 13 的問題上…沒想到你剛好就修掉 android 13 的相容性問題了…方便請教你的修復方式是?

对于3.1.3基础代码,在Android 13上表现为Candidate View不可见,而不是像当前Issue中是color问题。不可见的问题我的修复方法是: heiher@8fe862e

了解…感謝回覆…看起來是一樣的方式…就是不懂為什麼會需要這樣就是了…XD

用了几天,发现这个workaround方法也不是特别可靠,有时还是会出现候选栏不可见(布局空间还占用的invisible状态)的情况,需要切换到其它输入法再换回来才能恢复正常。

在测试另一个workaround方法:heiher@6b98eb2

正规解法得分析framework里的InputMethodService了,有时间再看看,先保证基本能用再说吧。:P

感謝分享…不過我自己用之前的那個方法…沒遇到過什麼問題…用戶也沒有反應有問題…暫時就先不改了…

不過就像你說的…目前問題的原因未知…因此能不能真正的解決問題也不曉得…就再看看官方有沒有要修正了…

zhihmeng avatar Dec 13 '22 07:12 zhihmeng

最新的提交可能已经修复了这个问题,可从 Actions 下载尝试。

WhiredPlanck avatar Dec 18 '22 18:12 WhiredPlanck

想請問一下…最後有找到 root cause 是什麼嗎?又是如何解決的?可否分享一下?謝謝…

zhihmeng avatar Mar 20 '23 09:03 zhihmeng