mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 21:34:44 +02:00
Follow monospaced setting everywhere
This commit is contained in:
@@ -24,6 +24,8 @@ import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Typeface;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.Spanned;
|
||||
@@ -41,6 +43,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
@@ -87,6 +90,9 @@ public class ActivityEML extends ActivityBase {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
boolean monospaced = prefs.getBoolean("monospaced", false);
|
||||
|
||||
getSupportActionBar().setSubtitle("EML");
|
||||
setContentView(R.layout.activity_eml);
|
||||
|
||||
@@ -108,6 +114,7 @@ public class ActivityEML extends ActivityBase {
|
||||
LinearLayoutManager llm = new LinearLayoutManager(this);
|
||||
rvAttachment.setLayoutManager(llm);
|
||||
|
||||
tvBody.setTypeface(monospaced ? Typeface.MONOSPACE : Typeface.DEFAULT);
|
||||
tvBody.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
vSeparatorAttachments.setVisibility(View.GONE);
|
||||
|
||||
@@ -23,6 +23,8 @@ import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
@@ -44,6 +46,7 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
@@ -64,6 +67,9 @@ public class ActivitySignature extends ActivityBase {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
boolean monospaced = prefs.getBoolean("monospaced", false);
|
||||
|
||||
getSupportActionBar().setSubtitle(getString(R.string.title_edit_signature));
|
||||
|
||||
LayoutInflater inflater = LayoutInflater.from(this);
|
||||
@@ -74,6 +80,8 @@ public class ActivitySignature extends ActivityBase {
|
||||
style_bar = findViewById(R.id.style_bar);
|
||||
bottom_navigation = findViewById(R.id.bottom_navigation);
|
||||
|
||||
etText.setTypeface(monospaced ? Typeface.MONOSPACE : Typeface.DEFAULT);
|
||||
|
||||
etText.setSelectionListener(new EditTextCompose.ISelection() {
|
||||
@Override
|
||||
public void onSelected(boolean selection) {
|
||||
|
||||
@@ -23,6 +23,8 @@ import android.app.Dialog;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
@@ -45,6 +47,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
@@ -89,6 +92,9 @@ public class FragmentAnswer extends FragmentBase {
|
||||
@Override
|
||||
@Nullable
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
boolean monospaced = prefs.getBoolean("monospaced", false);
|
||||
|
||||
setSubtitle(R.string.title_answer_caption);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
@@ -108,6 +114,8 @@ public class FragmentAnswer extends FragmentBase {
|
||||
pbWait = view.findViewById(R.id.pbWait);
|
||||
grpReady = view.findViewById(R.id.grpReady);
|
||||
|
||||
etText.setTypeface(monospaced ? Typeface.MONOSPACE : Typeface.DEFAULT);
|
||||
|
||||
etText.setSelectionListener(new EditTextCompose.ISelection() {
|
||||
@Override
|
||||
public void onSelected(boolean selection) {
|
||||
|
||||
@@ -626,6 +626,8 @@ public class FragmentCompose extends FragmentBase {
|
||||
}
|
||||
});
|
||||
|
||||
tvSignature.setTypeface(monospaced ? Typeface.MONOSPACE : Typeface.DEFAULT);
|
||||
|
||||
cbSignature.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
|
||||
@@ -236,7 +236,6 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:fontFamily="monospace"
|
||||
android:text="Body"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textIsSelectable="true"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="6dp"
|
||||
android:background="@null"
|
||||
android:fontFamily="monospace"
|
||||
android:gravity="top"
|
||||
android:hint="@string/title_edit_signature_text"
|
||||
android:imeOptions="actionDone"
|
||||
|
||||
@@ -98,7 +98,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
android:background="@null"
|
||||
android:fontFamily="monospace"
|
||||
android:gravity="top"
|
||||
android:hint="@string/title_answer_text"
|
||||
android:imeOptions="actionDone"
|
||||
|
||||
@@ -275,7 +275,6 @@
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:background="@null"
|
||||
android:fontFamily="monospace"
|
||||
android:gravity="top"
|
||||
android:hint="@string/title_body_hint"
|
||||
android:imeOptions="actionNone|flagNoEnterAction"
|
||||
@@ -314,7 +313,6 @@
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:fontFamily="monospace"
|
||||
android:minHeight="75dp"
|
||||
android:text="Signature"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:fontFamily="monospace"
|
||||
android:hyphenationFrequency="none"
|
||||
android:minHeight="60dp"
|
||||
android:paddingBottom="6dp"
|
||||
|
||||
@@ -360,7 +360,6 @@
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="monospace"
|
||||
android:text="Preview"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="italic"
|
||||
|
||||
@@ -358,7 +358,6 @@
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="monospace"
|
||||
android:text="Preview"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="italic"
|
||||
|
||||
Reference in New Issue
Block a user