0xbad1d3a5 / Kaku

画 - Japanese OCR Dictionary
https://kaku.fuwafuwa.ca/
BSD 3-Clause "New" or "Revised" License
203 stars 36 forks source link

Preventing capture window from viewing keyboard #34

Closed briandle00 closed 2 years ago

briandle00 commented 2 years ago

I believe this would work but cannot currently build Kaku to test it myself. But adding these two flags to the capture window's WindowManager.LayoutParams should work:

WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE

My reasoning for this is that because Kaku does not save any settings, it can get annoying to have to move or close the capture window to type something. Additionally, I use a popped out dictionary to look up words that Kaku was unable to parse (especially pure hiragana/katakana phrases) and the keyboard being under the capture window can quickly get annoying.

0xbad1d3a5 commented 2 years ago

I'm not entirely sure what you mean by this, but Kaku now builds out of the box, so you should be able to test it now.

If you mean to add those two LayoutParams make it so that your touches "pass through" the capture box when the keyboard is visible, I don't believe that's possible on Android.