Loading app/src/main/java/it/niedermann/owncloud/notes/android/fragment/NoteEditFragment.java +8 −0 Original line number Diff line number Diff line package it.niedermann.owncloud.notes.android.fragment; import android.content.SharedPreferences; import android.graphics.Typeface; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.preference.PreferenceManager; import android.support.annotation.Nullable; import android.text.Editable; import android.text.TextWatcher; Loading Loading @@ -108,6 +111,11 @@ public class NoteEditFragment extends BaseNoteFragment { editContent.setText(charSequence, TextView.BufferType.SPANNABLE); } }); SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext()); if(sp.getBoolean("font", false)) { editContent.setTypeface(Typeface.MONOSPACE); } } private final TextWatcher textWatcher = new TextWatcher() { Loading app/src/main/java/it/niedermann/owncloud/notes/android/fragment/NotePreviewFragment.java +8 −0 Original line number Diff line number Diff line package it.niedermann.owncloud.notes.android.fragment; import android.content.SharedPreferences; import android.graphics.Typeface; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.annotation.Nullable; import android.text.method.LinkMovementMethod; import android.util.Log; Loading Loading @@ -91,6 +94,11 @@ public class NotePreviewFragment extends BaseNoteFragment { }); noteContent.setText(content); noteContent.setMovementMethod(LinkMovementMethod.getInstance()); SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext()); if(sp.getBoolean("font", false)) { noteContent.setTypeface(Typeface.MONOSPACE); } } @Override Loading app/src/main/res/drawable/ic_text_fields_black_24dp.xml 0 → 100644 +5 −0 Original line number Diff line number Diff line <vector android:height="24dp" android:tint="#757575" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="#FF000000" android:pathData="M2.5,4v3h5v12h3L10.5,7h5L15.5,4h-13zM21.5,9h-9v3h3v7h3v-7h3L21.5,9z"/> </vector> app/src/main/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ <string name="settings_submitting">Connecting …</string> <string name="settings_note_mode">Display mode for Notes</string> <string name="settings_theme_title">Theme</string> <string name="settings_font_title">Mono-Font</string> <string name="settings_cert_category">Manage certificates</string> <string name="settings_cert_trust_system">Trust system certificates</string> <string name="settings_cert_trust_system_on">System and user-added CAs will be trusted (recommended)</string> Loading Loading @@ -135,6 +136,7 @@ <string name="pref_key_reset_trust" translatable="false">resetTrust</string> <string name="pref_key_note_mode" translatable="false">noteMode</string> <string name="pref_key_theme" translatable="false">darkTheme</string> <string name="pref_key_font" translatable="false">font</string> <string name="pref_key_last_note_mode" translatable="false">lastNoteMode</string> <string name="pref_value_mode_edit" translatable="false">edit</string> <string name="pref_value_mode_preview" translatable="false">preview</string> Loading @@ -142,6 +144,7 @@ <string name="pref_value_mode_note" translatable="false">note</string> <string name="pref_value_theme_light">Light</string> <string name="pref_value_theme_dark">Dark</string> <string name="pref_value_font_normal">Normal</string> <!-- Array: note modes --> <string-array name="noteMode_entries"> Loading app/src/main/res/xml/preferences.xml +6 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,12 @@ android:summary="%s" android:title="@string/settings_theme_title" /> <SwitchPreference android:defaultValue="@string/pref_value_font_normal" android:icon="@drawable/ic_text_fields_black_24dp" android:key="@string/pref_key_font" android:title="@string/settings_font_title" /> <PreferenceScreen android:key="@string/pref_key_certs" android:persistent="false" Loading Loading
app/src/main/java/it/niedermann/owncloud/notes/android/fragment/NoteEditFragment.java +8 −0 Original line number Diff line number Diff line package it.niedermann.owncloud.notes.android.fragment; import android.content.SharedPreferences; import android.graphics.Typeface; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.preference.PreferenceManager; import android.support.annotation.Nullable; import android.text.Editable; import android.text.TextWatcher; Loading Loading @@ -108,6 +111,11 @@ public class NoteEditFragment extends BaseNoteFragment { editContent.setText(charSequence, TextView.BufferType.SPANNABLE); } }); SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext()); if(sp.getBoolean("font", false)) { editContent.setTypeface(Typeface.MONOSPACE); } } private final TextWatcher textWatcher = new TextWatcher() { Loading
app/src/main/java/it/niedermann/owncloud/notes/android/fragment/NotePreviewFragment.java +8 −0 Original line number Diff line number Diff line package it.niedermann.owncloud.notes.android.fragment; import android.content.SharedPreferences; import android.graphics.Typeface; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.annotation.Nullable; import android.text.method.LinkMovementMethod; import android.util.Log; Loading Loading @@ -91,6 +94,11 @@ public class NotePreviewFragment extends BaseNoteFragment { }); noteContent.setText(content); noteContent.setMovementMethod(LinkMovementMethod.getInstance()); SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext()); if(sp.getBoolean("font", false)) { noteContent.setTypeface(Typeface.MONOSPACE); } } @Override Loading
app/src/main/res/drawable/ic_text_fields_black_24dp.xml 0 → 100644 +5 −0 Original line number Diff line number Diff line <vector android:height="24dp" android:tint="#757575" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="#FF000000" android:pathData="M2.5,4v3h5v12h3L10.5,7h5L15.5,4h-13zM21.5,9h-9v3h3v7h3v-7h3L21.5,9z"/> </vector>
app/src/main/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ <string name="settings_submitting">Connecting …</string> <string name="settings_note_mode">Display mode for Notes</string> <string name="settings_theme_title">Theme</string> <string name="settings_font_title">Mono-Font</string> <string name="settings_cert_category">Manage certificates</string> <string name="settings_cert_trust_system">Trust system certificates</string> <string name="settings_cert_trust_system_on">System and user-added CAs will be trusted (recommended)</string> Loading Loading @@ -135,6 +136,7 @@ <string name="pref_key_reset_trust" translatable="false">resetTrust</string> <string name="pref_key_note_mode" translatable="false">noteMode</string> <string name="pref_key_theme" translatable="false">darkTheme</string> <string name="pref_key_font" translatable="false">font</string> <string name="pref_key_last_note_mode" translatable="false">lastNoteMode</string> <string name="pref_value_mode_edit" translatable="false">edit</string> <string name="pref_value_mode_preview" translatable="false">preview</string> Loading @@ -142,6 +144,7 @@ <string name="pref_value_mode_note" translatable="false">note</string> <string name="pref_value_theme_light">Light</string> <string name="pref_value_theme_dark">Dark</string> <string name="pref_value_font_normal">Normal</string> <!-- Array: note modes --> <string-array name="noteMode_entries"> Loading
app/src/main/res/xml/preferences.xml +6 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,12 @@ android:summary="%s" android:title="@string/settings_theme_title" /> <SwitchPreference android:defaultValue="@string/pref_value_font_normal" android:icon="@drawable/ic_text_fields_black_24dp" android:key="@string/pref_key_font" android:title="@string/settings_font_title" /> <PreferenceScreen android:key="@string/pref_key_certs" android:persistent="false" Loading