0

As you see below, Google Translate can show a pop-up window when PROCESS_TEXT is received. (I am not asking for how to process this message.)

I want to do a similar thing but there are some problems. I created a pop-up window using TYPE_SYSTEM_ALERT. (I wanted to use TYPE_APPLICATION_OVERLAY, but a permission error kept happening.) How can I solve these problems and make a pup-up window just like that of Google Translate? I think this is not a weird requirements. Do you know any scaffolding, template or sample for this? I searched Google, but failed to find one.

  • With Google Translate's, you can press the back button to close it. Mine does not.
  • With Google Translate's, if you tap elsewhere (e.g., the shady part), it closes. Mine does not. I could get the "tap outside" event and close it, but only when FLAG_NOT_FOCUSABLE was set, but if that was set, I could not interact with it.

Google Translate

4

0 回答 0