Added HTML signature remark

pull/206/head
M66B 3 years ago
parent 574d521592
commit 1c01bb980d

@ -59,6 +59,7 @@ import java.util.Objects;
public class ActivitySignature extends ActivityBase {
private ViewGroup view;
private TextView tvHtmlRemark;
private EditTextCompose etText;
private BottomNavigationView style_bar;
private BottomNavigationView bottom_navigation;
@ -81,6 +82,7 @@ public class ActivitySignature extends ActivityBase {
view = (ViewGroup) inflater.inflate(R.layout.activity_signature, null, false);
setContentView(view);
tvHtmlRemark = findViewById(R.id.tvHtmlRemark);
etText = findViewById(R.id.etText);
style_bar = findViewById(R.id.style_bar);
bottom_navigation = findViewById(R.id.bottom_navigation);
@ -176,6 +178,7 @@ public class ActivitySignature extends ActivityBase {
// Initialize
FragmentDialogTheme.setBackground(this, view, true);
tvHtmlRemark.setVisibility(View.GONE);
style_bar.setVisibility(View.GONE);
setResult(RESULT_CANCELED, new Intent());
@ -279,6 +282,7 @@ public class ActivitySignature extends ActivityBase {
String html = (dirty
? getHtml()
: getIntent().getStringExtra("html"));
tvHtmlRemark.setVisibility(raw ? View.VISIBLE : View.GONE);
etText.setRaw(raw);
etText.setTypeface(raw ? Typeface.MONOSPACE : Typeface.DEFAULT);
load(html);

@ -11,6 +11,17 @@
android:layout_height="match_parent"
app:layout_behavior="eu.faircode.email.BehaviorBottomPadding">
<eu.faircode.email.FixedTextView
android:id="@+id/tvHtmlRemark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/title_edit_signature_remark"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<eu.faircode.email.EditTextCompose
android:id="@+id/etText"
android:layout_width="0dp"
@ -26,7 +37,7 @@
app:layout_constraintBottom_toTopOf="@+id/style_bar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@id/tvHtmlRemark" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/style_bar"

@ -1359,6 +1359,7 @@
<string name="title_next">Next</string>
<string name="title_edit_signature">Edit signature</string>
<string name="title_edit_signature_remark">Although Android cannot display all HTML, it will be sent as-is</string>
<string name="title_edit_signature_text">Signature text</string>
<string name="title_edit_signature_image">Insert image</string>

Loading…
Cancel
Save