|
|
@ -1921,7 +1921,7 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
startSearch();
|
|
|
|
startSearch();
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} else if (itemId == R.id.menu_clear) {
|
|
|
|
} else if (itemId == R.id.menu_clear) {
|
|
|
|
StyleHelper.apply(-1, R.id.menu_clear, getViewLifecycleOwner(), null, etBody);
|
|
|
|
StyleHelper.apply(R.id.menu_clear, getViewLifecycleOwner(), null, etBody);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} else if (itemId == R.id.menu_legend) {
|
|
|
|
} else if (itemId == R.id.menu_legend) {
|
|
|
|
onMenuLegend();
|
|
|
|
onMenuLegend();
|
|
|
@ -4216,7 +4216,7 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
int end = args.getInt("end");
|
|
|
|
int end = args.getInt("end");
|
|
|
|
String title = args.getString("title");
|
|
|
|
String title = args.getString("title");
|
|
|
|
etBody.setSelection(start, end);
|
|
|
|
etBody.setSelection(start, end);
|
|
|
|
StyleHelper.apply(-1, R.id.menu_link, getViewLifecycleOwner(), null, etBody, link, title);
|
|
|
|
StyleHelper.apply(R.id.menu_link, getViewLifecycleOwner(), null, etBody, link, title);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void onActionDiscardConfirmed() {
|
|
|
|
private void onActionDiscardConfirmed() {
|
|
|
@ -7155,17 +7155,17 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
case KeyEvent.KEYCODE_B:
|
|
|
|
case KeyEvent.KEYCODE_B:
|
|
|
|
if (etBody.hasSelection())
|
|
|
|
if (etBody.hasSelection())
|
|
|
|
return StyleHelper.apply(-1, R.id.menu_bold, getViewLifecycleOwner(), null, etBody);
|
|
|
|
return StyleHelper.apply(R.id.menu_bold, getViewLifecycleOwner(), null, etBody);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
case KeyEvent.KEYCODE_I:
|
|
|
|
case KeyEvent.KEYCODE_I:
|
|
|
|
if (etBody.hasSelection())
|
|
|
|
if (etBody.hasSelection())
|
|
|
|
return StyleHelper.apply(-1, R.id.menu_italic, getViewLifecycleOwner(), null, etBody);
|
|
|
|
return StyleHelper.apply(R.id.menu_italic, getViewLifecycleOwner(), null, etBody);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
case KeyEvent.KEYCODE_U:
|
|
|
|
case KeyEvent.KEYCODE_U:
|
|
|
|
if (etBody.hasSelection())
|
|
|
|
if (etBody.hasSelection())
|
|
|
|
return StyleHelper.apply(-1, R.id.menu_underline, getViewLifecycleOwner(), null, etBody);
|
|
|
|
return StyleHelper.apply(R.id.menu_underline, getViewLifecycleOwner(), null, etBody);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|