forked from androidx/androidx
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix text input popup position (#339)
* PlatformTextInputService. Undeprecate notifyFocusedRect Fixes JetBrains/compose-multiplatform#2040 Fixes JetBrains/compose-multiplatform#2493 notifyFocusedRect was deprecated in https://android-review.googlesource.com/c/platform/frameworks/support/+/1959647 On Android, before deprecation this method was used to scroll to the focused text input. This functionality was extracted to the text field itself, but we had another functionality on the other platforms. On Desktop we show text input popup near text input (for some languages): JetBrains/compose-multiplatform#2040 (comment) I think that this method is the right choice to implement this functionality, but I am not completely sure. Here my thoughts about alternatives: 1. Use BringIntoViewRequester. Not sure that it is possible, because its purpose - to show the view to the user, not use the passed information to determine the text popup position 2. Get information about focused area from another source that is not related to text input. For example, we can inject FocusManager, and retrieve the focused rect from it. Probably not a good idea, because the rect of arbitrary focused node isn't the same thing as the rect of focused input area. * Keep @deprecated until we don't merget this into AOSP
- Loading branch information
Showing
3 changed files
with
109 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters