Hello, I’d like to know that when I use an InputField on Android to bring up the soft keyboard, it causes the application to lose focus. At this point, if I want to click on a button or other UI elements within the application, I need to tap again to make the application regain focus before I can perform the action. Let me give you an example: suppose I want to create a chat tool, I hope that after users finish typing text, they can directly click the send button to send the message, rather than having to tap on the application again before sending the message.
Maybe file a bug report if you’re updated (if not, update)
To implement an InputField on Android, it involves creating a Dialog and synchronizing the content of an internal EditText with Unity. To achieve the functionality described, you need to customize an Activity, use reflection to obtain the dialog, and first set setCanceledOnTouchOutside(false)
to prevent it from closing directly when tapping outside, allowing manual control over the dialog’s closure. Then, resize the dialog to fill the entire screen and set all configurations to transparent. Additionally, listen for OnTouch events within Android to capture Down, Move, and Up events within the dialog and send them back to Unity, where Unity will process these inputs.