mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-21 21:57:19 +00:00
Experiment: template button / composer
This commit is contained in:
parent
f370b741d8
commit
b1c7cc3409
2 changed files with 22 additions and 0 deletions
|
@ -256,6 +256,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
private TextView tvPlainTextOnly;
|
private TextView tvPlainTextOnly;
|
||||||
private EditTextCompose etBody;
|
private EditTextCompose etBody;
|
||||||
private ImageView ivMarkdown;
|
private ImageView ivMarkdown;
|
||||||
|
private ImageButton ibTemplate;
|
||||||
private TextView tvNoInternet;
|
private TextView tvNoInternet;
|
||||||
private TextView tvSignature;
|
private TextView tvSignature;
|
||||||
private CheckBox cbSignature;
|
private CheckBox cbSignature;
|
||||||
|
@ -415,6 +416,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
tvPlainTextOnly = view.findViewById(R.id.tvPlainTextOnly);
|
tvPlainTextOnly = view.findViewById(R.id.tvPlainTextOnly);
|
||||||
etBody = view.findViewById(R.id.etBody);
|
etBody = view.findViewById(R.id.etBody);
|
||||||
ivMarkdown = view.findViewById(R.id.ivMarkdown);
|
ivMarkdown = view.findViewById(R.id.ivMarkdown);
|
||||||
|
ibTemplate = view.findViewById(R.id.ibTemplate);
|
||||||
tvNoInternet = view.findViewById(R.id.tvNoInternet);
|
tvNoInternet = view.findViewById(R.id.tvNoInternet);
|
||||||
tvSignature = view.findViewById(R.id.tvSignature);
|
tvSignature = view.findViewById(R.id.tvSignature);
|
||||||
cbSignature = view.findViewById(R.id.cbSignature);
|
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)
|
if (compose_color != Color.TRANSPARENT)
|
||||||
tvSignature.setTextColor(compose_color);
|
tvSignature.setTextColor(compose_color);
|
||||||
tvSignature.setTypeface(StyleHelper.getTypeface(compose_font, getContext()));
|
tvSignature.setTypeface(StyleHelper.getTypeface(compose_font, getContext()));
|
||||||
|
|
|
@ -360,6 +360,18 @@
|
||||||
app:srcCompat="@drawable/twotone_data_array_24"
|
app:srcCompat="@drawable/twotone_data_array_24"
|
||||||
app:tint="?attr/colorSeparator" />
|
app:tint="?attr/colorSeparator" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/ibTemplate"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:contentDescription="@string/menu_answers"
|
||||||
|
android:padding="3dp"
|
||||||
|
android:tooltipText="@string/menu_answers"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/etBody"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/etBody"
|
||||||
|
app:srcCompat="@drawable/twotone_text_snippet_24" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvNoInternet"
|
android:id="@+id/tvNoInternet"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
Loading…
Reference in a new issue