Implement Ctrl+B/I/U shorcut
These shortcut works as follows: - If the selected region is empty, do nothing. - If the selected region has at least one character that is not styled, e.g. bold, apply bold style. - If the selected region is fully styled, e.g. bold, remove bold style from the region. The default TextView/EditText supports styled editing, but it is used commonly as plain text fields, e.g. email address in the form, etc. So, not to style the text in such places, disable styled shortcut by default and let developers to enable it when necessary. Bug: 240628246 Test: TextViewStyleShortcutTest Change-Id: Id0f1cd85eb198553a852c5c2b628f5d03a2741e1
Loading
Please register or sign in to comment