mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-09 02:23:38 +02:00
Allow 5 preview lines
This commit is contained in:
@@ -113,6 +113,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
private SwitchCompat swPreview;
|
||||
private SwitchCompat swPreviewItalic;
|
||||
private Spinner spPreviewLines;
|
||||
private TextView tvPreviewLinesHint;
|
||||
|
||||
private SwitchCompat swAddresses;
|
||||
private EditText etMessageZoom;
|
||||
@@ -216,6 +217,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swPreview = view.findViewById(R.id.swPreview);
|
||||
swPreviewItalic = view.findViewById(R.id.swPreviewItalic);
|
||||
spPreviewLines = view.findViewById(R.id.spPreviewLines);
|
||||
tvPreviewLinesHint = view.findViewById(R.id.tvPreviewLinesHint);
|
||||
swAddresses = view.findViewById(R.id.swAddresses);
|
||||
etMessageZoom = view.findViewById(R.id.etMessageZoom);
|
||||
swOverviewMode = view.findViewById(R.id.swOverviewMode);
|
||||
@@ -661,6 +663,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
tvPreviewLinesHint.setText(getString(R.string.title_advanced_preview_lines_hint, NF.format(HtmlHelper.PREVIEW_SIZE)));
|
||||
|
||||
spPreviewLines.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
|
||||
|
||||
@@ -116,7 +116,7 @@ import static androidx.core.text.HtmlCompat.TO_HTML_PARAGRAPH_LINES_INDIVIDUAL;
|
||||
import static org.w3c.css.sac.Condition.SAC_CLASS_CONDITION;
|
||||
|
||||
public class HtmlHelper {
|
||||
private static final int PREVIEW_SIZE = 500; // characters
|
||||
static final int PREVIEW_SIZE = 500; // characters
|
||||
|
||||
private static final int DEFAULT_FONT_SIZE = 16; // pixels
|
||||
private static final int DEFAULT_FONT_SIZE_PT = 12; // points
|
||||
|
||||
Reference in New Issue
Block a user