|
|
@ -1276,7 +1276,7 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
onMenuAnswer();
|
|
|
|
onMenuAnswer();
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
case R.id.menu_clear:
|
|
|
|
case R.id.menu_clear:
|
|
|
|
StyleHelper.apply(R.id.menu_clear, etBody);
|
|
|
|
StyleHelper.apply(R.id.menu_clear, null, etBody);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
case R.id.menu_legend:
|
|
|
|
case R.id.menu_legend:
|
|
|
|
onMenuLegend();
|
|
|
|
onMenuLegend();
|
|
|
@ -1464,7 +1464,7 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
fragment.show(getParentFragmentManager(), "account:color");
|
|
|
|
fragment.show(getParentFragmentManager(), "account:color");
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
return StyleHelper.apply(action, etBody);
|
|
|
|
return StyleHelper.apply(action, view.findViewById(action), etBody);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void onActionRecordAudio() {
|
|
|
|
private void onActionRecordAudio() {
|
|
|
@ -2768,7 +2768,7 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
int start = args.getInt("start");
|
|
|
|
int start = args.getInt("start");
|
|
|
|
int end = args.getInt("end");
|
|
|
|
int end = args.getInt("end");
|
|
|
|
etBody.setSelection(start, end);
|
|
|
|
etBody.setSelection(start, end);
|
|
|
|
StyleHelper.apply(R.id.menu_color, etBody, color);
|
|
|
|
StyleHelper.apply(R.id.menu_color, null, etBody, color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void onLinkSelected(Bundle args) {
|
|
|
|
private void onLinkSelected(Bundle args) {
|
|
|
@ -2776,7 +2776,7 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
int start = args.getInt("start");
|
|
|
|
int start = args.getInt("start");
|
|
|
|
int end = args.getInt("end");
|
|
|
|
int end = args.getInt("end");
|
|
|
|
etBody.setSelection(start, end);
|
|
|
|
etBody.setSelection(start, end);
|
|
|
|
StyleHelper.apply(R.id.menu_link, etBody, link);
|
|
|
|
StyleHelper.apply(R.id.menu_link, null, etBody, link);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void onActionDiscardConfirmed() {
|
|
|
|
private void onActionDiscardConfirmed() {
|
|
|
@ -4848,17 +4848,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(R.id.menu_bold, etBody);
|
|
|
|
return StyleHelper.apply(R.id.menu_bold, 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(R.id.menu_italic, etBody);
|
|
|
|
return StyleHelper.apply(R.id.menu_italic, 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(R.id.menu_underline, etBody);
|
|
|
|
return StyleHelper.apply(R.id.menu_underline, null, etBody);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|