Instead of WindowInsets.ime the onFocusChanged function could be used. This way:
TextFormattingToolbar is only visible when Description is being focused on (previously while editing a note Name the TextFormattingToolbar was active)
TextFormattingToolbar is now visible when keyboard is detached on older Android version.
What is not fixed:
On older Android version Description area is not resized when InFocus, so the TextFormattingToolbar is not visible. AFAIU, this is handled by WindowInsets.IME which is available starting from Android 11.
Instead of WindowInsets.ime the onFocusChanged function could be used. This way:
What is not fixed: On older Android version Description area is not resized when InFocus, so the TextFormattingToolbar is not visible. AFAIU, this is handled by WindowInsets.IME which is available starting from Android 11.