mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Workaround losing selection on losing focus
This commit is contained in:
parent
eaef4843dd
commit
327f004c7a
1 changed files with 5 additions and 0 deletions
|
@ -1096,6 +1096,8 @@ public class FragmentCompose extends FragmentBase {
|
|||
Bundle args = new Bundle();
|
||||
args.putInt("color", Color.TRANSPARENT);
|
||||
args.putString("title", getString(R.string.title_style_color));
|
||||
args.putInt("start", etBody.getSelectionStart());
|
||||
args.putInt("end", etBody.getSelectionEnd());
|
||||
|
||||
FragmentDialogColor fragment = new FragmentDialogColor();
|
||||
fragment.setArguments(args);
|
||||
|
@ -1775,6 +1777,9 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
private void onColorSelected(Bundle args) {
|
||||
int color = args.getInt("color");
|
||||
int start = args.getInt("start");
|
||||
int end = args.getInt("end");
|
||||
etBody.setSelection(start, end);
|
||||
StyleHelper.apply(R.id.menu_color, etBody, color);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue