Version 1.16: Accessory View and Black theme
Accessory View and Black theme
This commit is contained in:
@@ -99,6 +99,7 @@ import sharedcode.turboeditor.texteditor.PageSystemButtons;
|
||||
import sharedcode.turboeditor.texteditor.Patterns;
|
||||
import sharedcode.turboeditor.texteditor.SearchResult;
|
||||
import sharedcode.turboeditor.util.AccessStorageApi;
|
||||
import sharedcode.turboeditor.util.AccessoryView;
|
||||
import sharedcode.turboeditor.util.AnimationUtils;
|
||||
import sharedcode.turboeditor.util.AppInfoHelper;
|
||||
import sharedcode.turboeditor.util.IHomeActivity;
|
||||
@@ -112,7 +113,7 @@ import sharedcode.turboeditor.views.GoodScrollView;
|
||||
public abstract class MainActivity extends ActionBarActivity implements IHomeActivity, FindTextDialog
|
||||
.SearchDialogInterface, GoodScrollView.ScrollInterface, PageSystem.PageSystemInterface,
|
||||
PageSystemButtons.PageButtonsInterface, NumberPickerDialog.INumberPickerDialog, SaveFileDialog.ISaveDialog,
|
||||
AdapterView.OnItemClickListener, AdapterDrawer.Callbacks{
|
||||
AdapterView.OnItemClickListener, AdapterDrawer.Callbacks, AccessoryView.IAccessoryView{
|
||||
|
||||
//region VARIABLES
|
||||
private static final int READ_REQUEST_CODE = 42;
|
||||
@@ -132,14 +133,14 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mEditor.replaceTextKeepCursor(null, true);
|
||||
mEditor.replaceTextKeepCursor(null);
|
||||
}
|
||||
};
|
||||
private static final Runnable colorRunnable_duringScroll =
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mEditor.replaceTextKeepCursor(null, false);
|
||||
mEditor.replaceTextKeepCursor(null);
|
||||
}
|
||||
};
|
||||
private static boolean fileOpened = false;
|
||||
@@ -630,6 +631,8 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
horizontalScroll = (HorizontalScrollView) findViewById(R.id.horizontal_scroll);
|
||||
mEditor = (Editor) findViewById(R.id.editor);
|
||||
|
||||
AccessoryView accessoryView = (AccessoryView) findViewById(R.id.accessoryView);
|
||||
accessoryView.setInterface(this);
|
||||
//mEditor.setLayerType(View.LAYER_TYPE_NONE, null);
|
||||
|
||||
if (PreferenceHelper.getWrapContent(this)) {
|
||||
@@ -660,7 +663,7 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
invalidateOptionsMenu();
|
||||
|
||||
mEditor.disableTextChangedListener();
|
||||
mEditor.replaceTextKeepCursor(pageSystem.getCurrentPageText(), false);
|
||||
mEditor.replaceTextKeepCursor(pageSystem.getCurrentPageText());
|
||||
mEditor.enableTextChangedListener();
|
||||
}
|
||||
|
||||
@@ -673,7 +676,7 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
findViewById(R.id.no_file_opened_messagge).setVisibility(View.VISIBLE);
|
||||
|
||||
mEditor.disableTextChangedListener();
|
||||
mEditor.replaceTextKeepCursor("", false);
|
||||
mEditor.replaceTextKeepCursor("");
|
||||
mEditor.enableTextChangedListener();
|
||||
} catch (Exception e) {
|
||||
// lol
|
||||
@@ -786,7 +789,7 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
//region EVENTBUS
|
||||
public void newFileToOpen(final File newFile, final String newFileText) {
|
||||
|
||||
if (fileOpened && mEditor.canSaveFile()) {
|
||||
if (fileOpened && mEditor != null && mEditor.canSaveFile()) {
|
||||
SaveFileDialog.newInstance(sFilePath, pageSystem.getAllText(mEditor
|
||||
.getText().toString()), currentEncoding, true, newFile.getAbsolutePath()).show(getFragmentManager(),
|
||||
"dialog");
|
||||
@@ -953,6 +956,8 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
|
||||
if (types.contains(PreferenceChangeType.THEME_CHANGE)) {
|
||||
ThemeUtils.setWindowsBackground(this);
|
||||
AccessoryView accessoryView = (AccessoryView) findViewById(R.id.accessoryView);
|
||||
accessoryView.updateTextColors();
|
||||
}
|
||||
|
||||
if (types.contains(PreferenceChangeType.WRAP_CONTENT)) {
|
||||
@@ -967,7 +972,7 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
}
|
||||
} else if (types.contains(PreferenceChangeType.LINE_NUMERS)) {
|
||||
mEditor.disableTextChangedListener();
|
||||
mEditor.replaceTextKeepCursor(null, true);
|
||||
mEditor.replaceTextKeepCursor(null);
|
||||
mEditor.enableTextChangedListener();
|
||||
if (PreferenceHelper.getLineNumbers(this)) {
|
||||
mEditor.setPadding(
|
||||
@@ -984,7 +989,7 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
}
|
||||
} else if (types.contains(PreferenceChangeType.SYNTAX)) {
|
||||
mEditor.disableTextChangedListener();
|
||||
mEditor.replaceTextKeepCursor(null, true);
|
||||
mEditor.replaceTextKeepCursor(null);
|
||||
mEditor.enableTextChangedListener();
|
||||
} else if (types.contains(PreferenceChangeType.MONOSPACE)) {
|
||||
if (PreferenceHelper.getUseMonospace(this))
|
||||
@@ -1039,14 +1044,14 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
try {
|
||||
final byte[] oldText = mEditor.getText().toString().getBytes(oldEncoding);
|
||||
mEditor.disableTextChangedListener();
|
||||
mEditor.replaceTextKeepCursor(new String(oldText, newEncoding), true);
|
||||
mEditor.replaceTextKeepCursor(new String(oldText, newEncoding));
|
||||
mEditor.enableTextChangedListener();
|
||||
currentEncoding = newEncoding;
|
||||
} catch (UnsupportedEncodingException ignored) {
|
||||
try {
|
||||
final byte[] oldText = mEditor.getText().toString().getBytes(oldEncoding);
|
||||
mEditor.disableTextChangedListener();
|
||||
mEditor.replaceTextKeepCursor(new String(oldText, "UTF-16"), true);
|
||||
mEditor.replaceTextKeepCursor(new String(oldText, "UTF-16"));
|
||||
mEditor.enableTextChangedListener();
|
||||
} catch (UnsupportedEncodingException ignored2) {
|
||||
}
|
||||
@@ -1109,7 +1114,7 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
pageSystem.savePage(mEditor.getText().toString());
|
||||
pageSystem.nextPage();
|
||||
mEditor.disableTextChangedListener();
|
||||
mEditor.replaceTextKeepCursor(pageSystem.getCurrentPageText(), false);
|
||||
mEditor.replaceTextKeepCursor(pageSystem.getCurrentPageText());
|
||||
mEditor.enableTextChangedListener();
|
||||
|
||||
verticalScroll.postDelayed(new Runnable() {
|
||||
@@ -1131,7 +1136,7 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
pageSystem.savePage(mEditor.getText().toString());
|
||||
pageSystem.prevPage();
|
||||
mEditor.disableTextChangedListener();
|
||||
mEditor.replaceTextKeepCursor(pageSystem.getCurrentPageText(), false);
|
||||
mEditor.replaceTextKeepCursor(pageSystem.getCurrentPageText());
|
||||
mEditor.enableTextChangedListener();
|
||||
|
||||
verticalScroll.postDelayed(new Runnable() {
|
||||
@@ -1220,7 +1225,7 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
pageSystem.savePage(mEditor.getText().toString());
|
||||
pageSystem.goToPage(value);
|
||||
mEditor.disableTextChangedListener();
|
||||
mEditor.replaceTextKeepCursor(pageSystem.getCurrentPageText(), true);
|
||||
mEditor.replaceTextKeepCursor(pageSystem.getCurrentPageText());
|
||||
mEditor.enableTextChangedListener();
|
||||
|
||||
verticalScroll.postDelayed(new Runnable() {
|
||||
@@ -1261,6 +1266,12 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
if (andCloseOpenedFile)
|
||||
cannotOpenFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onButtonAccessoryViewClicked(String text) {
|
||||
mEditor.getText().insert(mEditor.getSelectionStart(), text);
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
public static class Editor extends EditText {
|
||||
@@ -1658,10 +1669,11 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
canSaveFile = false;
|
||||
}
|
||||
|
||||
public void replaceTextKeepCursor(String textToUpdate, boolean mantainCursorPos) {
|
||||
public void replaceTextKeepCursor(String textToUpdate) {
|
||||
|
||||
int cursorPos;
|
||||
int cursorPosEnd;
|
||||
|
||||
if (textToUpdate != null) {
|
||||
cursorPos = 0;
|
||||
cursorPosEnd = 0;
|
||||
@@ -1682,6 +1694,8 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
|
||||
|
||||
enableTextChangedListener();
|
||||
|
||||
boolean mantainCursorPos = cursorPos >= firstVisibleIndex && cursorPos <= lastVisibleIndex;
|
||||
|
||||
if (mantainCursorPos)
|
||||
firstVisibleIndex = cursorPos;
|
||||
|
||||
|
@@ -49,6 +49,7 @@ public class EncodingDialog extends DialogFragment implements AdapterView.OnItem
|
||||
Constants.CHARSET_ISO_2022_CN,
|
||||
Constants.CHARSET_ISO_2022_JP,
|
||||
Constants.CHARSET_ISO_2022_KR,
|
||||
"ISO-8859-2",
|
||||
Constants.CHARSET_ISO_8859_5,
|
||||
Constants.CHARSET_ISO_8859_7,
|
||||
Constants.CHARSET_ISO_8859_8,
|
||||
|
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Vlad Mihalachi
|
||||
*
|
||||
* This file is part of Turbo Editor.
|
||||
*
|
||||
* Turbo Editor is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Turbo Editor is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package sharedcode.turboeditor.dialogfragment;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
|
||||
import sharedcode.turboeditor.R;
|
||||
import sharedcode.turboeditor.preferences.PreferenceHelper;
|
||||
|
||||
public class ThemeDialog extends DialogFragment implements AdapterView.OnItemClickListener {
|
||||
|
||||
private ListView list;
|
||||
|
||||
public static ThemeDialog newInstance() {
|
||||
final ThemeDialog f = new ThemeDialog();
|
||||
return f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
|
||||
final View view = getActivity().getLayoutInflater().inflate(R.layout.dialog_theme_list, null);
|
||||
list = (ListView) view.findViewById(android.R.id.list);
|
||||
|
||||
String[] themes = {
|
||||
getString(R.string.theme_dark), getString(R.string.light_theme), getString(R.string.theme_black)
|
||||
};
|
||||
|
||||
list.setAdapter(new ArrayAdapter<>(getActivity(), R.layout.item_single_choice, themes));
|
||||
list.setOnItemClickListener(this);
|
||||
|
||||
int currentTheme = PreferenceHelper.getTheme(getActivity());
|
||||
|
||||
for (int i = 0; i < themes.length; i++) {
|
||||
if (i == currentTheme)
|
||||
list.setItemChecked(i, true);
|
||||
}
|
||||
|
||||
return new AlertDialog.Builder(getActivity())
|
||||
.setView(view)
|
||||
.create();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
DialogListener target = (DialogListener) getTargetFragment();
|
||||
if (target == null) {
|
||||
target = (DialogListener) getActivity();
|
||||
}
|
||||
target.onThemeSelected(position);
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
public interface DialogListener {
|
||||
void onThemeSelected(int result);
|
||||
}
|
||||
}
|
@@ -57,8 +57,20 @@ public final class PreferenceHelper {
|
||||
return getPrefs(context).getBoolean("editor_wrap_content", true);
|
||||
}
|
||||
|
||||
public static int getTheme(Context context) {
|
||||
return getPrefs(context).getInt("theme", 0);
|
||||
}
|
||||
|
||||
public static boolean getDarkTheme(Context context) {
|
||||
return getPrefs(context).getInt("theme", 0) == 0;
|
||||
}
|
||||
|
||||
public static boolean getLightTheme(Context context) {
|
||||
return getPrefs(context).getBoolean("light_theme", false);
|
||||
return getPrefs(context).getInt("theme", 0) == 1;
|
||||
}
|
||||
|
||||
public static boolean getBlackTheme(Context context) {
|
||||
return getPrefs(context).getInt("theme", 0) == 2;
|
||||
}
|
||||
|
||||
public static boolean getSuggestionActive(Context context) {
|
||||
@@ -158,8 +170,8 @@ public final class PreferenceHelper {
|
||||
getEditor(context).putBoolean("has_donated", value).commit();
|
||||
}
|
||||
|
||||
public static void setLightTheme(Context context, boolean value) {
|
||||
getEditor(context).putBoolean("light_theme", value).commit();
|
||||
public static void setTheme(Context context, int value) {
|
||||
getEditor(context).putInt("theme", value).commit();
|
||||
}
|
||||
|
||||
public static void setSuggestionsActive(Context context, boolean value) {
|
||||
@@ -179,7 +191,7 @@ public final class PreferenceHelper {
|
||||
}
|
||||
|
||||
public static void setSendErrorReport(Context context, boolean value) {
|
||||
getEditor(context).putBoolean("ignore_back_button", value).commit();
|
||||
getEditor(context).putBoolean("send_error_reports", value).commit();
|
||||
}
|
||||
|
||||
public static void setEncoding(Context context, String value) {
|
||||
|
@@ -20,6 +20,8 @@
|
||||
package sharedcode.turboeditor.preferences;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -32,9 +34,11 @@ import sharedcode.turboeditor.R;
|
||||
import sharedcode.turboeditor.activity.MainActivity;
|
||||
import sharedcode.turboeditor.dialogfragment.EncodingDialog;
|
||||
import sharedcode.turboeditor.dialogfragment.NumberPickerDialog;
|
||||
import sharedcode.turboeditor.dialogfragment.ThemeDialog;
|
||||
import sharedcode.turboeditor.util.ProCheckUtils;
|
||||
import sharedcode.turboeditor.util.ViewUtils;
|
||||
|
||||
public class SettingsFragment extends Fragment implements NumberPickerDialog.INumberPickerDialog, EncodingDialog.DialogListener {
|
||||
public class SettingsFragment extends Fragment implements NumberPickerDialog.INumberPickerDialog, EncodingDialog.DialogListener, ThemeDialog.DialogListener {
|
||||
|
||||
// Editor Variables
|
||||
private boolean sLineNumbers;
|
||||
@@ -43,7 +47,6 @@ public class SettingsFragment extends Fragment implements NumberPickerDialog.INu
|
||||
private boolean sUseMonospace;
|
||||
private boolean sReadOnly;
|
||||
|
||||
private boolean sLightTheme;
|
||||
private boolean sSuggestions;
|
||||
private boolean sAutoSave;
|
||||
private boolean sIgnoreBackButton;
|
||||
@@ -59,7 +62,6 @@ public class SettingsFragment extends Fragment implements NumberPickerDialog.INu
|
||||
sLineNumbers = PreferenceHelper.getLineNumbers(getActivity());
|
||||
sReadOnly = PreferenceHelper.getReadOnly(getActivity());
|
||||
|
||||
sLightTheme = PreferenceHelper.getLightTheme(getActivity());
|
||||
sSuggestions = PreferenceHelper.getSuggestionActive(getActivity());
|
||||
sAutoSave = PreferenceHelper.getAutoSave(getActivity());
|
||||
sIgnoreBackButton = PreferenceHelper.getIgnoreBackButton(getActivity());
|
||||
@@ -73,7 +75,7 @@ public class SettingsFragment extends Fragment implements NumberPickerDialog.INu
|
||||
// Our custom layout
|
||||
final View rootView = inflater.inflate(R.layout.fragment_settings, container, false);
|
||||
final SwitchCompat swLineNumbers, swSyntax, swWrapContent, swMonospace, swReadOnly;
|
||||
final SwitchCompat swLightTheme, swSuggestions, swAutoSave, swIgnoreBackButton, swSplitText, swErrorReports;
|
||||
final SwitchCompat swSuggestions, swAutoSave, swIgnoreBackButton, swSplitText, swErrorReports;
|
||||
|
||||
swLineNumbers = (SwitchCompat) rootView.findViewById(R.id.switch_line_numbers);
|
||||
swSyntax = (SwitchCompat) rootView.findViewById(R.id.switch_syntax);
|
||||
@@ -81,7 +83,6 @@ public class SettingsFragment extends Fragment implements NumberPickerDialog.INu
|
||||
swMonospace = (SwitchCompat) rootView.findViewById(R.id.switch_monospace);
|
||||
swReadOnly = (SwitchCompat) rootView.findViewById(R.id.switch_read_only);
|
||||
|
||||
swLightTheme = (SwitchCompat) rootView.findViewById(R.id.switch_light_theme);
|
||||
swSuggestions = (SwitchCompat) rootView.findViewById(R.id.switch_suggestions_active);
|
||||
swAutoSave = (SwitchCompat) rootView.findViewById(R.id.switch_auto_save);
|
||||
swIgnoreBackButton = (SwitchCompat) rootView.findViewById(R.id.switch_ignore_backbutton);
|
||||
@@ -94,17 +95,31 @@ public class SettingsFragment extends Fragment implements NumberPickerDialog.INu
|
||||
swMonospace.setChecked(sUseMonospace);
|
||||
swReadOnly.setChecked(sReadOnly);
|
||||
|
||||
swLightTheme.setChecked(sLightTheme);
|
||||
swSuggestions.setChecked(sSuggestions);
|
||||
swAutoSave.setChecked(sAutoSave);
|
||||
swIgnoreBackButton.setChecked(sIgnoreBackButton);
|
||||
swSplitText.setChecked(sSplitText);
|
||||
swErrorReports.setChecked(sErrorReports);
|
||||
|
||||
TextView fontSizeView, encodingView, donateView, extraOptionsView;
|
||||
TextView fontSizeView, encodingView, extraOptionsView, themeView, goPro;
|
||||
goPro = (TextView) rootView.findViewById(R.id.drawer_button_go_pro);
|
||||
fontSizeView = (TextView) rootView.findViewById(R.id.drawer_button_font_size);
|
||||
encodingView = (TextView) rootView.findViewById(R.id.drawer_button_encoding);
|
||||
extraOptionsView = (TextView) rootView.findViewById(R.id.drawer_button_extra_options);
|
||||
themeView = (TextView) rootView.findViewById(R.id.drawer_button_theme);
|
||||
|
||||
ViewUtils.setVisible(goPro, !ProCheckUtils.isPro(getActivity()));
|
||||
goPro.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
final String appPackageName = "com.maskyn.fileeditorpro";
|
||||
try {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
|
||||
} catch (android.content.ActivityNotFoundException anfe) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
swLineNumbers.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
@@ -183,11 +198,12 @@ public class SettingsFragment extends Fragment implements NumberPickerDialog.INu
|
||||
}
|
||||
});
|
||||
|
||||
swLightTheme.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
themeView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
PreferenceHelper.setLightTheme(getActivity(), isChecked);
|
||||
((MainActivity) getActivity()).aPreferenceValueWasChanged(PreferenceChangeType.THEME_CHANGE);
|
||||
public void onClick(View v) {
|
||||
ThemeDialog dialogFrag = ThemeDialog.newInstance();
|
||||
dialogFrag.setTargetFragment(SettingsFragment.this, 0);
|
||||
dialogFrag.show(getFragmentManager().beginTransaction(), "dialog");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -242,4 +258,10 @@ public class SettingsFragment extends Fragment implements NumberPickerDialog.INu
|
||||
PreferenceHelper.setEncoding(getActivity(), result);
|
||||
((MainActivity) getActivity()).aPreferenceValueWasChanged(PreferenceChangeType.ENCODING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onThemeSelected(int result) {
|
||||
PreferenceHelper.setTheme(getActivity(), result);
|
||||
((MainActivity) getActivity()).aPreferenceValueWasChanged(PreferenceChangeType.THEME_CHANGE);
|
||||
}
|
||||
}
|
||||
|
@@ -55,17 +55,20 @@ public class Patterns {
|
||||
"(!|,|\\(|\\)|\\+|\\-|\\*|<|>|=|\\.|\\?|;|\\{|\\}|\\[|\\]|\\|)");
|
||||
public static final Pattern NUMBERS_OR_SYMBOLS = Pattern.compile(NUMBERS.pattern()+"|"+SYMBOLS.pattern());
|
||||
public static final Pattern GENERAL_KEYWORDS = Pattern.compile(
|
||||
"\\b(alignas|alignof|and|and_eq|asm|auto|bitand|bitorbool|break|case|catch|char|"
|
||||
+ "char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype"
|
||||
+ "|default|delete|do|double|dynamic_cast|echo|else|enum|explicit|export|extern|"
|
||||
+ "false|float|for|friend|function|goto|if|inline|int|mutable|namespace|new|noexcept|"
|
||||
+ "not|not_eq|null|nullptr|operator|or|or_eq|private|protected|public|register|"
|
||||
+ "reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast"
|
||||
+ "|struct|switch|template|this|thread_local|throw|true|try|typedef|typeid|typename|undefined"
|
||||
+ "|union|unsigned|using|var|virtual|void|volatile|wchar_t|while|xor|xor_eq|)\\b", Pattern.CASE_INSENSITIVE);
|
||||
"(?<=\\b)((alignas)|(alignof)|(and)|(and_eq)|(asm)|(auto)|(bitand)|(bitorbool)|(break)|(case)|(catch)|(char)|("
|
||||
+ "char16_t)|(char32_t)|(class)|(compl)|(const)|(constexpr)|(const_cast)|(continue)|(decltype"
|
||||
+ ")|(default)|(delete)|(do)|(double)|(dynamic_cast)|(echo)|(else)|(enum)|(explicit)|(export)|(extern)|("
|
||||
+ "false)|(float)|(for)|(friend)|(function)|(goto)|(if)|(inline)|(int)|(mutable)|(namespace)|(new)|(noexcept)|("
|
||||
+ "not)|(not_eq)|(null)|(nullptr)|(operator)|(or)|(or_eq)|(private)|(protected)|(public)|(register)|("
|
||||
+ "reinterpret_cast)|(return)|(short)|(signed)|(sizeof)|(static)|(static_assert)|(static_cast"
|
||||
+ ")|(struct)|(switch)|(template)|(this)|(thread_local)|(throw)|(true)|(try)|(typedef)|(typeid)|(typename)|(undefined"
|
||||
+ ")|(union)|(unsigned)|(using)|(var)|(virtual)|(void)|(volatile)|(wchar_t)|(while)|(xor)|(xor_eq))(?=\\b)", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
public static final Pattern PY_KEYWORDS = Pattern.compile(
|
||||
"\\b(int|float|long|complex|str|unicode|list|tuple|bytearray|buffer|xrange|set|frozenset|dict|bool)|(True|False|None|self|NotImplemented|Ellipsis|__debug__|__file__)|(and|del|from|not|while|as|elif|global|or|with|assert|else|if|pass|yield|break|except|import|print|class|exec|in|raise|continue|finally|is|return|def|for|lambda|try)|(ArithmeticError|AssertionError|AttributeError|BaseException|DeprecationWarning|EnvironmentError|EOFError|Exception|FloatingPointError|FutureWarning|GeneratorExit|IOError|ImportError|ImportWarning|IndexError|KeyError|KeyboardInterrupt|LookupError|MemoryError|NameError|NotImplementedError|OSError|OverflowError|PendingDeprecationWarning|ReferenceError|RuntimeError|RuntimeWarning|StandardError|StopIteration|SyntaxError|SyntaxWarning|SystemError|SystemExit|TypeError|UnboundLocalError|UserWarning|UnicodeError|UnicodeWarning|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|ValueError|Warning|WindowsError|ZeroDivisionError)\\b", Pattern.CASE_INSENSITIVE);
|
||||
"(?<=\\b)((int)|(float)|(long)|(complex)|(str)|(unicode)|(list)|(tuple)|(bytearray)|(buffer)|(xrange)|(set)|(frozenset)|(dict)|(bool)" +
|
||||
"|(True)|(False)|(None)|(self)|(NotImplemented)|(Ellipsis)|(__debug__)|(__file__)" +
|
||||
"|(and)|(del)|(from)|(not)|(while)|(as)|(elif)|(global)|(or)|(with)|(assert)|(else)|(if)|(pass)|(yield)|(break)|(except)|(import)|(print)|(class)|(exec)|(in)|(raise)|(continue)|(finally)|(is)|(return)|(def)|(for)|(lambda)|(try)" +
|
||||
"|(ArithmeticError)|(AssertionError)|(AttributeError)|(BaseException)|(DeprecationWarning)|(EnvironmentError)|(EOFError)|(Exception)|(FloatingPointError)|(FutureWarning)|(GeneratorExit)|(IOError)|(ImportError)|(ImportWarning)|(IndexError)|(KeyError)|(KeyboardInterrupt)|(LookupError)|(MemoryError)|(NameError)|(NotImplementedError)|(OSError)|(OverflowError)|(PendingDeprecationWarning)|(ReferenceError)|(RuntimeError)|(RuntimeWarning)|(StandardError)|(StopIteration)|(SyntaxError)|(SyntaxWarning)|(SystemError)|(SystemExit)|(TypeError)|(UnboundLocalError)|(UserWarning)|(UnicodeError)|(UnicodeWarning)|(UnicodeEncodeError)|(UnicodeDecodeError)|(UnicodeTranslateError)|(ValueError)|(Warning)|(WindowsError)|(ZeroDivisionError))(?=\\b)", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
public static final Pattern LUA_KEYWORDS = Pattern.compile(
|
||||
"@[A-Za-z0-9_\\.]*|\\b(local|global|boolean|number|userdata)\\b|\\b(true|false|nil)\\b|\\b(return|then|while|and|break|do|else|elseif|end|for|function|if|in|not|or|repeat|until|thread|table)\\b" +
|
||||
@@ -82,7 +85,7 @@ public class Patterns {
|
||||
public static final Pattern GENERAL_COMMENTS_NO_SLASH = Pattern.compile(
|
||||
"/\\*(?:.|[\\n\\r])*?\\*/|#.*");
|
||||
public static final Pattern SQL_KEYWORDS = Pattern.compile(
|
||||
"\\b(ADD|EXCEPT|PERCENT|ALL|EXEC|PLAN|ALTER|EXECUTE|PRECISION|AND|EXISTS|PRIMARY|ANY|EXIT|PRINT|AS|FETCH|PROC|ASC|FILE|PROCEDURE|AUTHORIZATION|FILLFACTOR|PUBLIC|BACKUP|FOR|RAISERROR|BEGIN|FOREIGN|READ|BETWEEN|FREETEXT|READTEXT|BREAK|FREETEXTTABLE|RECONFIGURE|BROWSE|FROM|REFERENCES|BULK|FULL|REPLICATION|BY|FUNCTION|RESTORE|CASCADE|GOTO|RESTRICT|CASE|GRANT|RETURN|CHECK|GROUP|REVOKE|CHECKPOINT|HAVING|RIGHT|CLOSE|HOLDLOCK|ROLLBACK|CLUSTERED|IDENTITY|ROWCOUNT|COALESCE|IDENTITY_INSERT|ROWGUIDCOL|COLLATE|IDENTITYCOL|RULE|COLUMN|IF|SAVE|COMMIT|IN|SCHEMA|COMPUTE|INDEX|SELECT|CONSTRAINT|INNER|SESSION_USER|CONTAINS|INSERT|SET|CONTAINSTABLE|INTERSECT|SETUSER|CONTINUE|INTO|SHUTDOWN|CONVERT|IS|SOME|CREATE|JOIN|STATISTICS|CROSS|KEY|SYSTEM_USER|CURRENT|KILL|TABLE|CURRENT_DATE|LEFT|TEXTSIZE|CURRENT_TIME|LIKE|THEN|CURRENT_TIMESTAMP|LINENO|TO|CURRENT_USER|LOAD|TOP|CURSOR|NATIONAL|TRAN|DATABASE|NOCHECK|TRANSACTION|DBCC|NONCLUSTERED|TRIGGER|DEALLOCATE|NOT|TRUNCATE|DECLARE|NULL|TSEQUAL|DEFAULT|NULLIF|UNION|DELETE|OF|UNIQUE|DENY|OFF|UPDATE|DESC|OFFSETS|UPDATETEXT|DISK|ON|USE|DISTINCT|OPEN|USER|DISTRIBUTED|OPENDATASOURCE|VALUES|DOUBLE|OPENQUERY|VARYING|DROP|OPENROWSET|VIEW|DUMMY|OPENXML|WAITFOR|DUMP|OPTION|WHEN|ELSE|OR|WHERE|END|ORDER|WHILE|ERRLVL|OUTER|WITH|ESCAPE|OVER|WRITETEXT)\\b", Pattern.CASE_INSENSITIVE);
|
||||
"(?<=\\b)((ADD)|(EXCEPT)|(PERCENT)|(ALL)|(EXEC)|(PLAN)|(ALTER)|(EXECUTE)|(PRECISION)|(AND)|(EXISTS)|(PRIMARY)|(ANY)|(EXIT)|(PRINT)|(AS)|(FETCH)|(PROC)|(ASC)|(FILE)|(PROCEDURE)|(AUTHORIZATION)|(FILLFACTOR)|(PUBLIC)|(BACKUP)|(FOR)|(RAISERROR)|(BEGIN)|(FOREIGN)|(READ)|(BETWEEN)|(FREETEXT)|(READTEXT)|(BREAK)|(FREETEXTTABLE)|(RECONFIGURE)|(BROWSE)|(FROM)|(REFERENCES)|(BULK)|(FULL)|(REPLICATION)|(BY)|(FUNCTION)|(RESTORE)|(CASCADE)|(GOTO)|(RESTRICT)|(CASE)|(GRANT)|(RETURN)|(CHECK)|(GROUP)|(REVOKE)|(CHECKPOINT)|(HAVING)|(RIGHT)|(CLOSE)|(HOLDLOCK)|(ROLLBACK)|(CLUSTERED)|(IDENTITY)|(ROWCOUNT)|(COALESCE)|(IDENTITY_INSERT)|(ROWGUIDCOL)|(COLLATE)|(IDENTITYCOL)|(RULE)|(COLUMN)|(IF)|(SAVE)|(COMMIT)|(IN)|(SCHEMA)|(COMPUTE)|(INDEX)|(SELECT)|(CONSTRAINT)|(INNER)|(SESSION_USER)|(CONTAINS)|(INSERT)|(SET)|(CONTAINSTABLE)|(INTERSECT)|(SETUSER)|(CONTINUE)|(INTO)|(SHUTDOWN)|(CONVERT)|(IS)|(SOME)|(CREATE)|(JOIN)|(STATISTICS)|(CROSS)|(KEY)|(SYSTEM_USER)|(CURRENT)|(KILL)|(TABLE)|(CURRENT_DATE)|(LEFT)|(TEXTSIZE)|(CURRENT_TIME)|(LIKE)|(THEN)|(CURRENT_TIMESTAMP)|(LINENO)|(TO)|(CURRENT_USER)|(LOAD)|(TOP)|(CURSOR)|(NATIONAL)|(TRAN)|(DATABASE)|(NOCHECK)|(TRANSACTION)|(DBCC)|(NONCLUSTERED)|(TRIGGER)|(DEALLOCATE)|(NOT)|(TRUNCATE)|(DECLARE)|(NULL)|(TSEQUAL)|(DEFAULT)|(NULLIF)|(UNION)|(DELETE)|(OF)|(UNIQUE)|(DENY)|(OFF)|(UPDATE)|(DESC)|(OFFSETS)|(UPDATETEXT)|(DISK)|(ON)|(USE)|(DISTINCT)|(OPEN)|(USER)|(DISTRIBUTED)|(OPENDATASOURCE)|(VALUES)|(DOUBLE)|(OPENQUERY)|(VARYING)|(DROP)|(OPENROWSET)|(VIEW)|(DUMMY)|(OPENXML)|(WAITFOR)|(DUMP)|(OPTION)|(WHEN)|(ELSE)|(OR)|(WHERE)|(END)|(ORDER)|(WHILE)|(ERRLVL)|(OUTER)|(WITH)|(ESCAPE)|(OVER)|(WRITETEXT))(?=\\b)", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
|
||||
public static final Pattern LINK = android.util.Patterns.WEB_URL;
|
||||
|
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Vlad Mihalachi
|
||||
*
|
||||
* This file is part of Turbo Editor.
|
||||
*
|
||||
* Turbo Editor is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Turbo Editor is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package sharedcode.turboeditor.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import sharedcode.turboeditor.R;
|
||||
import sharedcode.turboeditor.preferences.PreferenceHelper;
|
||||
|
||||
/**
|
||||
* Created by mac on 15/02/15.
|
||||
*/
|
||||
public class AccessoryView extends LinearLayout {
|
||||
|
||||
public IAccessoryView iAccessoryView;
|
||||
private TypedValue outValue;
|
||||
|
||||
public AccessoryView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public AccessoryView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public AccessoryView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
setOrientation(HORIZONTAL);
|
||||
createView();
|
||||
}
|
||||
|
||||
public void setInterface(IAccessoryView iBreadcrumb) {
|
||||
this.iAccessoryView = iBreadcrumb;
|
||||
}
|
||||
|
||||
|
||||
public void createView() {
|
||||
removeAllViews();
|
||||
|
||||
// If we're running on Honeycomb or newer, then we can use the Theme's
|
||||
// selectableItemBackground to ensure that the View has a pressed state
|
||||
outValue = new TypedValue();
|
||||
getContext().getTheme().resolveAttribute(R.attr.selectableItemBackgroundBorderless, outValue, true);
|
||||
|
||||
String[] characters = {
|
||||
"<", ">", "!", "/", ".", ";", "=", "\"", "{", "}", "[", "]", "(", ")", "&", "|", "#", "*", "+", "-", ":", "%", ",", "_", "@", "?", "^", "'",
|
||||
};
|
||||
|
||||
for (int i = 0; i < characters.length; i++)
|
||||
addAButton(characters[i]);
|
||||
|
||||
updateTextColors();
|
||||
}
|
||||
|
||||
private void addAButton(final String text) {
|
||||
int dimension = (int) PixelDipConverter.convertDpToPixel(50, getContext());
|
||||
//int padding = (int) PixelDipConverter.convertDpToPixel(10, getContext());
|
||||
final Button name = new Button(getContext());
|
||||
|
||||
name.setLayoutParams(new LinearLayout.LayoutParams(dimension, dimension));
|
||||
|
||||
|
||||
name.setGravity(Gravity.CENTER);
|
||||
|
||||
name.setText(text);
|
||||
name.setTextSize(15);
|
||||
name.setAllCaps(true);
|
||||
|
||||
//name.setPadding(padding, padding, padding, padding);
|
||||
|
||||
name.setClickable(true);
|
||||
|
||||
name.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
iAccessoryView.onButtonAccessoryViewClicked(text);
|
||||
}
|
||||
});
|
||||
|
||||
name.setBackgroundResource(outValue.resourceId);
|
||||
addView(name);
|
||||
}
|
||||
|
||||
public void updateTextColors() {
|
||||
boolean isLightTheme = PreferenceHelper.getLightTheme(getContext());
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
((Button) getChildAt(i)).setTextColor(isLightTheme ? getResources().getColor(android.R.color.background_dark) : getResources().getColor(android.R.color.white));
|
||||
}
|
||||
}
|
||||
|
||||
public interface IAccessoryView {
|
||||
public void onButtonAccessoryViewClicked(String text);
|
||||
}
|
||||
}
|
@@ -25,11 +25,11 @@ public class ProCheckUtils {
|
||||
public static boolean isPro(Context context, boolean includeDonations) {
|
||||
|
||||
// happy new year
|
||||
return true;
|
||||
return context.getPackageName().equals("com.maskyn.fileeditorpro");
|
||||
/*
|
||||
if (Build.FOR_AMAZON)
|
||||
return true;
|
||||
else if (context.getPackageName().equals("com.maskyn.fileeditorpro"))
|
||||
else if ()
|
||||
return true;
|
||||
else if (includeDonations && PreferenceHelper.hasDonated(context))
|
||||
return true;
|
||||
|
@@ -35,21 +35,16 @@ public class ThemeUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void setPreferenceTheme(Activity activity){
|
||||
boolean light = PreferenceHelper.getLightTheme(activity);
|
||||
if (light) {
|
||||
activity.setTheme(R.style.PreferenceLight);
|
||||
} else {
|
||||
activity.setTheme(R.style.PreferenceDark);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setWindowsBackground(Activity activity) {
|
||||
boolean whiteTheme = PreferenceHelper.getLightTheme(activity);
|
||||
boolean darkTheme = PreferenceHelper.getDarkTheme(activity);
|
||||
boolean blackTheme = PreferenceHelper.getBlackTheme(activity);
|
||||
if (whiteTheme) {
|
||||
activity.getWindow().setBackgroundDrawableResource(R.color.window_background_light);
|
||||
} else {
|
||||
} else if (darkTheme) {
|
||||
activity.getWindow().setBackgroundDrawableResource(R.color.window_background);
|
||||
} else {
|
||||
activity.getWindow().setBackgroundDrawableResource(android.R.color.black);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -58,7 +58,8 @@
|
||||
android:scrollbars="vertical"
|
||||
android:fillViewport="true"
|
||||
android:id="@id/vertical_scroll"
|
||||
android:background="@null">
|
||||
android:background="@null"
|
||||
android:layout_marginBottom="50dp">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_height="wrap_content"
|
||||
@@ -82,14 +83,14 @@
|
||||
android:text=""
|
||||
android:textIsSelectable="true" />
|
||||
</HorizontalScrollView>
|
||||
</sharedcode.turboeditor.views.GoodScrollView>
|
||||
</sharedcode.turboeditor.views.GoodScrollView>
|
||||
|
||||
<com.faizmalkani.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabNext"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginBottom="66dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:visibility="invisible"/>
|
||||
@@ -99,11 +100,23 @@
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginBottom="66dp"
|
||||
android:layout_marginRight="100dp"
|
||||
android:layout_marginEnd="90dp"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:scrollbars="horizontal"
|
||||
android:layout_gravity="bottom"
|
||||
android:fillViewport="false">
|
||||
<sharedcode.turboeditor.util.AccessoryView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:id="@+id/accessoryView"></sharedcode.turboeditor.util.AccessoryView>
|
||||
</HorizontalScrollView>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2014 Vlad Mihalachi
|
||||
~
|
||||
~ This file is part of Turbo Editor.
|
||||
~
|
||||
~ Turbo Editor is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ Turbo Editor is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:choiceMode="singleChoice"/>
|
||||
|
||||
</LinearLayout>
|
@@ -32,6 +32,21 @@
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@id/drawer_button_go_pro"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:text="@string/donation_action"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="12sp"
|
||||
android:clickable="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/indigo"/>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="match_parent"
|
||||
@@ -115,11 +130,10 @@
|
||||
android:text="@string/font_size"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="12sp"
|
||||
|
||||
android:clickable="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/navigation_drawer_button_text_color_inverted"/>
|
||||
@@ -147,18 +161,19 @@
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
android:gravity="center_vertical"
|
||||
<TextView
|
||||
android:id="@id/drawer_button_theme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:text="@string/light_theme"
|
||||
android:textSize="12sp"
|
||||
android:id="@id/switch_light_theme"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="@string/theme"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="12sp"
|
||||
android:clickable="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/navigation_drawer_button_text_color_inverted"/>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
|
@@ -20,7 +20,15 @@
|
||||
|
||||
<changelog bulletedList="true">
|
||||
|
||||
<changelogversion versionName="1.15" changeDate="Oct 30, 2014">
|
||||
<changelogversion versionName="1.16" changeDate="Mar 14, 2015">
|
||||
<changelogtext>Happy PI day!</changelogtext>
|
||||
<changelogtext>Added the Accessory View (now you can input more easily special symbols!)</changelogtext>
|
||||
<changelogtext>Added a Black theme!</changelogtext>
|
||||
<changelogtext>Added ISO-8859-2 encoding</changelogtext>
|
||||
<changelogtext>Bug fixes</changelogtext>
|
||||
</changelogversion>
|
||||
|
||||
<changelogversion versionName="1.15" changeDate="Mar 13, 2015">
|
||||
<changelogtext>It is a "beta" release, feel free to send you feedback on github.com!</changelogtext>
|
||||
<changelogtext>Added Save As! (and rename option)</changelogtext>
|
||||
<changelogtext>Added Replace All!</changelogtext>
|
||||
|
@@ -76,7 +76,6 @@
|
||||
<item type="id" name="switch_syntax"/>
|
||||
<item type="id" name="switch_wrap_content"/>
|
||||
<item type="id" name="switch_monospace"/>
|
||||
<item type="id" name="switch_light_theme"/>
|
||||
<item type="id" name="switch_suggestions_active"/>
|
||||
<item type="id" name="switch_auto_save"/>
|
||||
<item type="id" name="switch_read_only"/>
|
||||
@@ -86,6 +85,7 @@
|
||||
<item type="id" name="switch_send_error_reports"/>
|
||||
|
||||
<item type="id" name="drawer_button_go_pro"/>
|
||||
<item type="id" name="drawer_button_theme"/>
|
||||
<item type="id" name="drawer_button_encoding"/>
|
||||
<item type="id" name="drawer_button_font_size"/>
|
||||
<item name="im_select_folder" type="id" />
|
||||
|
@@ -75,4 +75,7 @@
|
||||
<string name="new_file">New file</string>
|
||||
<string name="delete_current_file">Delete current file</string>
|
||||
<string name="replace_all">Replace all</string>
|
||||
<string name="theme">Theme</string>
|
||||
<string name="theme_dark">Dark theme</string>
|
||||
<string name="theme_black">Black theme</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user