nowinandroid icon indicating copy to clipboard operation
nowinandroid copied to clipboard

[FR]: Retain states of SearchTextField after configuration changes

Open saryongkang opened this issue 2 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the problem

Unlike EditText in Android Views, TextField in Compose doesn’t automatically retain or restore its states as the device goes through configuration changes such as rotating the device between landscape and portrait orientations, folding / unfolding the device, resizing window, switching dark mode, etc. Currently, the app opens keyboard after configuration changed even when a user hid the keyboard by tapping back button or 'search' key. Also, position of cursor is not retained after the event.

This is also to find out good solution for this public issue on Compose: https://issuetracker.google.com/192776771

Describe the solution

I suggest to implement equivalent experiences with EditText, by retaining the following after configuration changes:

  • Position of cursor
  • Text selection
  • Focus
  • Keyboard visibility

Additional context

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

saryongkang avatar Nov 13 '23 05:11 saryongkang