Experiment: template button / composer

This commit is contained in:
M66B
2024-02-24 11:32:13 +01:00
parent f370b741d8
commit b1c7cc3409
2 changed files with 22 additions and 0 deletions

View File

@@ -256,6 +256,7 @@ public class FragmentCompose extends FragmentBase {
private TextView tvPlainTextOnly;
private EditTextCompose etBody;
private ImageView ivMarkdown;
private ImageButton ibTemplate;
private TextView tvNoInternet;
private TextView tvSignature;
private CheckBox cbSignature;
@@ -415,6 +416,7 @@ public class FragmentCompose extends FragmentBase {
tvPlainTextOnly = view.findViewById(R.id.tvPlainTextOnly);
etBody = view.findViewById(R.id.etBody);
ivMarkdown = view.findViewById(R.id.ivMarkdown);
ibTemplate = view.findViewById(R.id.ibTemplate);
tvNoInternet = view.findViewById(R.id.tvNoInternet);
tvSignature = view.findViewById(R.id.tvSignature);
cbSignature = view.findViewById(R.id.cbSignature);
@@ -815,6 +817,14 @@ public class FragmentCompose extends FragmentBase {
}
});
ibTemplate.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
ibTemplate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onMenuAnswerInsert(v);
}
});
if (compose_color != Color.TRANSPARENT)
tvSignature.setTextColor(compose_color);
tvSignature.setTypeface(StyleHelper.getTypeface(compose_font, getContext()));