From 79df485bd8cee49dd526ca18b94f3bedc1b6fb4a Mon Sep 17 00:00:00 2001
From: Pavlos Siaperas
Date: Tue, 4 Jun 2013 19:07:51 +0300
Subject: [PATCH 1/4] Testing adding possibility to send email, sms and rate
files
---
Ted/.classpath | 21 ++--
Ted/AndroidManifest.xml | 27 +++-
Ted/lint.xml | 3 +
Ted/res/layout/layout_save_as.xml | 25 ++--
Ted/res/layout/mail.xml | 59 +++++++++
Ted/res/layout/rating.xml | 49 ++++++++
Ted/res/layout/sms.xml | 44 +++++++
Ted/res/values/arrays.xml | 19 ++-
Ted/res/values/strings.xml | 13 +-
Ted/res/values/toasts.xml | 4 +
Ted/res/xml/ted_prefs.xml | 6 +
.../xgouchet/texteditor/RatingActivity.java | 116 ++++++++++++++++++
.../texteditor/SendEmailActivity.java | 69 +++++++++++
.../xgouchet/texteditor/SendSMSActivity.java | 64 ++++++++++
.../fr/xgouchet/texteditor/TedActivity.java | 53 +++++++-
.../texteditor/TedSaveAsActivity.java | 34 ++++-
.../texteditor/TedSettingsActivity.java | 3 +
.../xgouchet/texteditor/common/Constants.java | 22 ++++
.../xgouchet/texteditor/common/Settings.java | 6 +
.../texteditor/common/TextFileUtils.java | 29 +----
.../texteditor/ui/view/AdvancedEditText.java | 26 +++-
21 files changed, 633 insertions(+), 59 deletions(-)
create mode 100644 Ted/lint.xml
create mode 100644 Ted/res/layout/mail.xml
create mode 100644 Ted/res/layout/rating.xml
create mode 100644 Ted/res/layout/sms.xml
create mode 100644 Ted/src/fr/xgouchet/texteditor/RatingActivity.java
create mode 100644 Ted/src/fr/xgouchet/texteditor/SendEmailActivity.java
create mode 100644 Ted/src/fr/xgouchet/texteditor/SendSMSActivity.java
diff --git a/Ted/.classpath b/Ted/.classpath
index 3e2b42f..7788487 100755
--- a/Ted/.classpath
+++ b/Ted/.classpath
@@ -1,9 +1,12 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Ted/AndroidManifest.xml b/Ted/AndroidManifest.xml
index 77f06a1..889b3af 100755
--- a/Ted/AndroidManifest.xml
+++ b/Ted/AndroidManifest.xml
@@ -4,9 +4,9 @@
android:installLocation="auto"
android:versionCode="19"
android:versionName="Release 1.8.1" >
-
+
-
+
+
@@ -107,6 +108,7 @@
android:name=".TedSettingsActivity"
android:label="@string/title_settings"
android:windowSoftInputMode="stateHidden" >
+
@@ -152,6 +154,24 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Ted/lint.xml b/Ted/lint.xml
new file mode 100644
index 0000000..ee0eead
--- /dev/null
+++ b/Ted/lint.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/Ted/res/layout/layout_save_as.xml b/Ted/res/layout/layout_save_as.xml
index 8fa327e..9f5d989 100755
--- a/Ted/res/layout/layout_save_as.xml
+++ b/Ted/res/layout/layout_save_as.xml
@@ -4,21 +4,28 @@
android:layout_height="match_parent"
android:orientation="vertical" >
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Ted/res/layout/rating.xml b/Ted/res/layout/rating.xml
new file mode 100644
index 0000000..19896eb
--- /dev/null
+++ b/Ted/res/layout/rating.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Ted/res/layout/sms.xml b/Ted/res/layout/sms.xml
new file mode 100644
index 0000000..826c315
--- /dev/null
+++ b/Ted/res/layout/sms.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Ted/res/values/arrays.xml b/Ted/res/values/arrays.xml
index e5eacf0..51957ed 100755
--- a/Ted/res/values/arrays.xml
+++ b/Ted/res/values/arrays.xml
@@ -17,8 +17,7 @@
- 4
-
-
+
- 6 pt
- 8 pt
- 10 pt
@@ -43,6 +42,20 @@
- 48
+
+ - Normal
+ - Bold
+ - Italic
+ - Bold_Italic
+
+
+
+ - 0
+ - 1
+ - 2
+ - 3
+
+
- Android / Linux / Unix
@@ -96,5 +109,7 @@
- ISO-8859-1
- UTF-8
+
+
\ No newline at end of file
diff --git a/Ted/res/values/strings.xml b/Ted/res/values/strings.xml
index 0b7e14a..e6a9cc0 100755
--- a/Ted/res/values/strings.xml
+++ b/Ted/res/values/strings.xml
@@ -16,6 +16,9 @@
Ted - Settings
Ted - About ...
Ted - Text Font
+ Ted - Email
+ Ted - SMS
+ Ted - Rating
Display
@@ -48,7 +51,9 @@
Select a file to open when you launch Ted from your home screen
Auto save will overwrite existing files
Auto save will only work with new files
-
+ Text Font
+ Text style
+
New
Open
@@ -60,7 +65,10 @@
Search
Undo
Quit
-
+ Email
+ SMS
+ Rating
+
"Do you want to save your document? \nAny unsaved changes will be lost. "
Save
@@ -77,4 +85,5 @@
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porttitor neque semper sem fermentum pretium. Sed pharetra dui faucibus massa malesuada in condimentum mi gravida."
"All icons for this app were created and belong to the author of the app : Xavier Gouchet (android@xgouchet.fr)."
+
\ No newline at end of file
diff --git a/Ted/res/values/toasts.xml b/Ted/res/values/toasts.xml
index 3c301fa..da5b297 100755
--- a/Ted/res/values/toasts.xml
+++ b/Ted/res/values/toasts.xml
@@ -11,6 +11,9 @@
Unable to load the file browser
Unable to load the settings page
Unable to load the about page
+ Unable to load emailing page
+ Unable to load SMS page
+ Unable to load Rating page
Unable to open the file, not enough memory
Unable to open the file (maybe the file is too big, or corrupted)
Unable to save, path is null
@@ -32,5 +35,6 @@
Select a file to open
Select a file to open when you launch Ted from your home screen
"The opened file was saved automatically, and will be opened at next startup"
+
\ No newline at end of file
diff --git a/Ted/res/xml/ted_prefs.xml b/Ted/res/xml/ted_prefs.xml
index 39cb1aa..9b38fde 100755
--- a/Ted/res/xml/ted_prefs.xml
+++ b/Ted/res/xml/ted_prefs.xml
@@ -26,6 +26,12 @@
android:entryValues="@array/text_size_values"
android:key="text_size"
android:title="@string/config_title_text_size" />
+
list = Arrays.asList("doc", "docx", "log", "ascii", "txt", "html", "htm", "lst", "odt", "upd", "readme", "awp", "awt", "bean","php","ini","sh","js","db","conf","cfg");
+
+ if (!(list.contains(extension)))
+ {
+ fileName+=".txt";
+ }
+
+ //save result
result = new Intent();
result.putExtra("path", mCurrentFolder.getAbsolutePath()
+ File.separator + fileName);
-
+
setResult(RESULT_OK, result);
+
+ //make file read-only if the radio button is checked
+ File file = new File(mCurrentFolder.getAbsolutePath()
+ + File.separator + fileName);
+ RadioButton readOnly;
+
+ readOnly = (RadioButton) findViewById(R.id.readonly);
+
+ if (readOnly.isChecked()) {
+ file.setWritable(false);
+ }
return true;
}
+
/** the edit text input */
protected EditText mFileName;
diff --git a/Ted/src/fr/xgouchet/texteditor/TedSettingsActivity.java b/Ted/src/fr/xgouchet/texteditor/TedSettingsActivity.java
index 8404d66..0426848 100755
--- a/Ted/src/fr/xgouchet/texteditor/TedSettingsActivity.java
+++ b/Ted/src/fr/xgouchet/texteditor/TedSettingsActivity.java
@@ -155,6 +155,9 @@ protected void updateSummaries() {
listPref = (ListPreference) findPreference(PREFERENCE_TEXT_SIZE);
listPref.setSummary(listPref.getEntry());
+
+ listPref = (ListPreference) findPreference(PREFERENCE_BOLD_ITALIC);
+ listPref.setSummary(listPref.getEntry());
listPref = (ListPreference) findPreference(PREFERENCE_END_OF_LINES);
listPref.setSummary(listPref.getEntry());
diff --git a/Ted/src/fr/xgouchet/texteditor/common/Constants.java b/Ted/src/fr/xgouchet/texteditor/common/Constants.java
index 406f4d9..93bc75f 100755
--- a/Ted/src/fr/xgouchet/texteditor/common/Constants.java
+++ b/Ted/src/fr/xgouchet/texteditor/common/Constants.java
@@ -40,6 +40,12 @@ public interface Constants {
public static final int MENU_ID_UNDO = 8;
/** redo last change ( = {@value} ) */
public static final int MENU_ID_REDO = 9;
+ /** send mail ( = {@value} ) */
+ public static final int MENU_ID_EMAIL = 10;
+ /** send sms ( = {@value} ) */
+ public static final int MENU_ID_SMS = 11;
+ /** add rating ( = {@value} ) */
+ public static final int MENU_ID_RATING = 12;
/** Quit the app ( = {@value} ) */
public static final int MENU_ID_QUIT = 666;
@@ -69,6 +75,8 @@ public interface Constants {
public static final String PREFERENCE_HIGHLIGHT = "highlight_syntax";
/** Preference tag to retrieve the Text Size ( = {@value} ) */
public static final String PREFERENCE_TEXT_SIZE = "text_size";
+ /** Preference tag to retrieve the BOLD_ITALIC ( = {@value} ) */
+ public static final String PREFERENCE_BOLD_ITALIC = "text_style";
/** Preference tag to retrieve the End of lines pref ( = {@value} ) */
public static final String PREFERENCE_END_OF_LINES = "end_of_lines";
/** Preference tag to retrieve the Encoding pref ( = {@value} ) */
@@ -126,6 +134,20 @@ public interface Constants {
/** color theme dracula : red on black ( = {@value} ) */
public static final int COLOR_DRACULA = 4;
+
+ /** by default */
+ public static final int NORMAL = 0;
+ /** bold italic */
+ public static final int BOLD_ITALIC = 3;
+ /** bold */
+ public static final int BOLD = 1;
+ /** italic */
+ public static final int ITALIC = 2;
+
+
+
+
+
/** Request code for Save As Activity */
public static final int REQUEST_SAVE_AS = 107;
/** Request code for Open Activity */
diff --git a/Ted/src/fr/xgouchet/texteditor/common/Settings.java b/Ted/src/fr/xgouchet/texteditor/common/Settings.java
index 3f64595..98fbc72 100755
--- a/Ted/src/fr/xgouchet/texteditor/common/Settings.java
+++ b/Ted/src/fr/xgouchet/texteditor/common/Settings.java
@@ -26,6 +26,9 @@ public class Settings implements Constants {
/** Text size setting */
public static int TEXT_SIZE = 12;
+
+ /** Text change */
+ public static int NORMAL = 0;
/** Default end of line */
public static int DEFAULT_END_OF_LINE = EOL_LINUX;
@@ -83,6 +86,8 @@ public static void updateFromPreferences(SharedPreferences settings) {
WORDWRAP = settings.getBoolean(PREFERENCE_WORDWRAP, false);
TEXT_SIZE = getStringPreferenceAsInteger(settings,
PREFERENCE_TEXT_SIZE, "12");
+ NORMAL = getStringPreferenceAsInteger(settings,
+ PREFERENCE_BOLD_ITALIC,("" + NORMAL));
DEFAULT_END_OF_LINE = getStringPreferenceAsInteger(settings,
PREFERENCE_END_OF_LINES, ("" + EOL_LINUX));
FORCE_AUTO_SAVE = settings.getBoolean(PREFERENCE_AUTO_SAVE, false);
@@ -167,3 +172,4 @@ public static Typeface getTypeface(Context ctx) {
return res;
}
}
+
diff --git a/Ted/src/fr/xgouchet/texteditor/common/TextFileUtils.java b/Ted/src/fr/xgouchet/texteditor/common/TextFileUtils.java
index c565405..66d124c 100755
--- a/Ted/src/fr/xgouchet/texteditor/common/TextFileUtils.java
+++ b/Ted/src/fr/xgouchet/texteditor/common/TextFileUtils.java
@@ -11,7 +11,6 @@
import java.io.OutputStreamWriter;
import fr.xgouchet.texteditor.BuildConfig;
-import org.mozilla.universalchardet.UniversalDetector;
import android.content.Context;
import android.util.Log;
@@ -67,7 +66,7 @@ public static String readTextFile(File file) {
int c;
try {
reader = new InputStreamReader(new FileInputStream(file),
- detectCharSet(file.getAbsolutePath()));
+ Settings.ENCODING);
in = new BufferedReader(reader);
do {
c = in.read();
@@ -166,30 +165,4 @@ public static String readInternal(Context context) {
public static void clearInternal(Context context) {
writeInternal(context, "");
}
-
- /**
- * Detect charset
- * @see https://code.google.com/p/juniversalchardet/
- * @param fileName
- * the absolute path of the file to open
- * @return charset name
- *
- * */
- public static String detectCharSet(String fileName) throws IOException {
- byte[] buf = new byte[4096];
- FileInputStream fis = new FileInputStream(fileName);
-
- UniversalDetector detector = new UniversalDetector(null);
-
- int nread;
- while ((nread = fis.read(buf)) > 0 && !detector.isDone()) {
- detector.handleData(buf, 0, nread);
- }
- detector.dataEnd();
-
- String encoding = detector.getDetectedCharset();
-
- detector.reset();
- return encoding;
- }
}
diff --git a/Ted/src/fr/xgouchet/texteditor/ui/view/AdvancedEditText.java b/Ted/src/fr/xgouchet/texteditor/ui/view/AdvancedEditText.java
index 19807a8..c6ef8fe 100644
--- a/Ted/src/fr/xgouchet/texteditor/ui/view/AdvancedEditText.java
+++ b/Ted/src/fr/xgouchet/texteditor/ui/view/AdvancedEditText.java
@@ -236,12 +236,31 @@ public void updateFromSettings() {
if (isInEditMode()) {
return;
}
-
setTypeface(Settings.getTypeface(getContext()));
// wordwrap
setHorizontallyScrolling(!Settings.WORDWRAP);
-
+
+//bold_italic_underline
+ switch (Settings.NORMAL) {
+
+ case BOLD:
+ //setTypeface(Settings.getTypeface(getContext()));
+ setTypeface(null, Typeface.BOLD);
+ break;
+ case ITALIC:
+ //setTypeface(Settings.getTypeface(getContext()));
+ setTypeface(null, Typeface.ITALIC);
+ break;
+ case BOLD_ITALIC:
+ //setTypeface(Settings.getTypeface(getContext()));
+ setTypeface(null, Typeface.BOLD_ITALIC);
+ break;
+ default:
+ setTypeface(null, Typeface.NORMAL);
+ break;
+ }
+
// color Theme
switch (Settings.COLOR) {
case COLOR_NEGATIVE:
@@ -282,6 +301,7 @@ public void updateFromSettings() {
setTextSize(Settings.TEXT_SIZE);
mPaintNumbers.setTextSize(Settings.TEXT_SIZE * mScale * 0.85f);
+
// refresh view
postInvalidate();
refreshDrawableState();
@@ -363,4 +383,4 @@ protected void computeLineHighlight() {
protected int mHighlightStart;
protected Rect mDrawingRect, mLineBounds;
-}
+}
\ No newline at end of file
From 2c6f4c24e20f894028726ec87f4c3191b0fd7361 Mon Sep 17 00:00:00 2001
From: Pavlos Siaperas
Date: Tue, 4 Jun 2013 21:46:18 +0300
Subject: [PATCH 2/4] wrong stupidity
---
Ted/.classpath | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/Ted/.classpath b/Ted/.classpath
index 7788487..0c151f5 100755
--- a/Ted/.classpath
+++ b/Ted/.classpath
@@ -1,12 +1,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 996622670eba635d5493e9898c3be0a9f522becf Mon Sep 17 00:00:00 2001
From: Pavlos Siaperas
Date: Tue, 4 Jun 2013 22:12:36 +0300
Subject: [PATCH 3/4] adding various changes
---
Ted/.classpath | 32 ++-
Ted/AndroidManifest.xml | 27 ++-
Ted/lint.xml | 3 +
Ted/res/layout/layout_save_as.xml | 25 ++-
Ted/res/layout/mail.xml | 59 ++++++
Ted/res/layout/rating.xml | 49 +++++
Ted/res/layout/sms.xml | 44 ++++
Ted/res/values/arrays.xml | 19 +-
Ted/res/values/strings.xml | 13 +-
Ted/res/values/toasts.xml | 4 +
Ted/res/xml/ted_prefs.xml | 6 +
.../xgouchet/texteditor/RatingActivity.java | 189 ++++++++++++++++++
.../texteditor/SendEmailActivity.java | 104 ++++++++++
.../xgouchet/texteditor/SendSMSActivity.java | 99 +++++++++
.../fr/xgouchet/texteditor/TedActivity.java | 53 ++++-
.../texteditor/TedSaveAsActivity.java | 34 +++-
.../texteditor/TedSettingsActivity.java | 3 +
.../xgouchet/texteditor/common/Constants.java | 22 ++
.../xgouchet/texteditor/common/Settings.java | 6 +
.../texteditor/common/TextFileUtils.java | 29 +--
.../texteditor/ui/view/AdvancedEditText.java | 42 +++-
21 files changed, 804 insertions(+), 58 deletions(-)
create mode 100644 Ted/lint.xml
create mode 100644 Ted/res/layout/mail.xml
create mode 100644 Ted/res/layout/rating.xml
create mode 100644 Ted/res/layout/sms.xml
create mode 100644 Ted/src/fr/xgouchet/texteditor/RatingActivity.java
create mode 100644 Ted/src/fr/xgouchet/texteditor/SendEmailActivity.java
create mode 100644 Ted/src/fr/xgouchet/texteditor/SendSMSActivity.java
diff --git a/Ted/.classpath b/Ted/.classpath
index 3e2b42f..31d3104 100755
--- a/Ted/.classpath
+++ b/Ted/.classpath
@@ -1,9 +1,25 @@
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
+
+
+
+
+
+
+
+
+<<<<<<< HEAD
+=======
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
diff --git a/Ted/AndroidManifest.xml b/Ted/AndroidManifest.xml
index 77f06a1..889b3af 100755
--- a/Ted/AndroidManifest.xml
+++ b/Ted/AndroidManifest.xml
@@ -4,9 +4,9 @@
android:installLocation="auto"
android:versionCode="19"
android:versionName="Release 1.8.1" >
-
+
-
+
+
@@ -107,6 +108,7 @@
android:name=".TedSettingsActivity"
android:label="@string/title_settings"
android:windowSoftInputMode="stateHidden" >
+
@@ -152,6 +154,24 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Ted/lint.xml b/Ted/lint.xml
new file mode 100644
index 0000000..ee0eead
--- /dev/null
+++ b/Ted/lint.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/Ted/res/layout/layout_save_as.xml b/Ted/res/layout/layout_save_as.xml
index 8fa327e..9f5d989 100755
--- a/Ted/res/layout/layout_save_as.xml
+++ b/Ted/res/layout/layout_save_as.xml
@@ -4,21 +4,28 @@
android:layout_height="match_parent"
android:orientation="vertical" >
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Ted/res/layout/rating.xml b/Ted/res/layout/rating.xml
new file mode 100644
index 0000000..19896eb
--- /dev/null
+++ b/Ted/res/layout/rating.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Ted/res/layout/sms.xml b/Ted/res/layout/sms.xml
new file mode 100644
index 0000000..826c315
--- /dev/null
+++ b/Ted/res/layout/sms.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Ted/res/values/arrays.xml b/Ted/res/values/arrays.xml
index e5eacf0..51957ed 100755
--- a/Ted/res/values/arrays.xml
+++ b/Ted/res/values/arrays.xml
@@ -17,8 +17,7 @@
- 4
-
-
+
- 6 pt
- 8 pt
- 10 pt
@@ -43,6 +42,20 @@
- 48
+
+ - Normal
+ - Bold
+ - Italic
+ - Bold_Italic
+
+
+
+ - 0
+ - 1
+ - 2
+ - 3
+
+
- Android / Linux / Unix
@@ -96,5 +109,7 @@
- ISO-8859-1
- UTF-8
+
+
\ No newline at end of file
diff --git a/Ted/res/values/strings.xml b/Ted/res/values/strings.xml
index 0b7e14a..e6a9cc0 100755
--- a/Ted/res/values/strings.xml
+++ b/Ted/res/values/strings.xml
@@ -16,6 +16,9 @@
Ted - Settings
Ted - About ...
Ted - Text Font
+ Ted - Email
+ Ted - SMS
+ Ted - Rating
Display
@@ -48,7 +51,9 @@
Select a file to open when you launch Ted from your home screen
Auto save will overwrite existing files
Auto save will only work with new files
-
+ Text Font
+ Text style
+
New
Open
@@ -60,7 +65,10 @@
Search
Undo
Quit
-
+ Email
+ SMS
+ Rating
+
"Do you want to save your document? \nAny unsaved changes will be lost. "
Save
@@ -77,4 +85,5 @@
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porttitor neque semper sem fermentum pretium. Sed pharetra dui faucibus massa malesuada in condimentum mi gravida."
"All icons for this app were created and belong to the author of the app : Xavier Gouchet (android@xgouchet.fr)."
+
\ No newline at end of file
diff --git a/Ted/res/values/toasts.xml b/Ted/res/values/toasts.xml
index 3c301fa..da5b297 100755
--- a/Ted/res/values/toasts.xml
+++ b/Ted/res/values/toasts.xml
@@ -11,6 +11,9 @@
Unable to load the file browser
Unable to load the settings page
Unable to load the about page
+ Unable to load emailing page
+ Unable to load SMS page
+ Unable to load Rating page
Unable to open the file, not enough memory
Unable to open the file (maybe the file is too big, or corrupted)
Unable to save, path is null
@@ -32,5 +35,6 @@
Select a file to open
Select a file to open when you launch Ted from your home screen
"The opened file was saved automatically, and will be opened at next startup"
+
\ No newline at end of file
diff --git a/Ted/res/xml/ted_prefs.xml b/Ted/res/xml/ted_prefs.xml
index 39cb1aa..9b38fde 100755
--- a/Ted/res/xml/ted_prefs.xml
+++ b/Ted/res/xml/ted_prefs.xml
@@ -26,6 +26,12 @@
android:entryValues="@array/text_size_values"
android:key="text_size"
android:title="@string/config_title_text_size" />
+
>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.rating);
+<<<<<<< HEAD
+
+=======
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ //create database
+ db = openOrCreateDatabase("tedratingdata.db", SQLiteDatabase.CREATE_IF_NECESSARY, null);
+ db.setVersion(1);
+ db.setLocale(Locale.getDefault());
+ db.setLockingEnabled(true);
+<<<<<<< HEAD
+
+=======
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ //create table
+ final String CREATE_TABLE_FILES ="CREATE TABLE IF NOT EXISTS ted (ID integer primary key autoincrement,NAME text,RATING integer);";
+ db.execSQL(CREATE_TABLE_FILES);
+ db.execSQL("SELECT * FROM ted ORDER BY ID desc;");
+<<<<<<< HEAD
+
+=======
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ //find last rating given to the file using its path
+ int rating=2;
+ if (path != null ) {
+ Cursor c = db.rawQuery("SELECT RATING FROM ted " +
+ "where NAME='"+path+"' LIMIT 1;", null);
+<<<<<<< HEAD
+
+=======
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ if (c != null ) {
+ if (c.moveToFirst()) {
+ do {
+ rating = c.getInt(c.getColumnIndex("RATING"));
+ }while (c.moveToNext());
+ }
+ }
+ c.close();
+ }
+
+ float rating2=(float) rating;
+ addListenerOnRatingBar(rating2);
+ addListenerOnButton();
+<<<<<<< HEAD
+
+ }
+
+ public void addListenerOnRatingBar(float rating2) {
+
+=======
+
+ }
+
+ public void addListenerOnRatingBar(float rating2) {
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ ratingBar = (RatingBar) findViewById(R.id.ratingBar);
+ txtRatingValue = (TextView) findViewById(R.id.txtRatingValue);
+ ratingBar.setRating(rating2);
+
+ //if rating value is changed,
+ //display the current rating value in the result (textview) automatically
+ ratingBar.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
+ public void onRatingChanged(RatingBar ratingBar, float rating,
+ boolean fromUser) {
+ txtRatingValue.setText(String.valueOf(rating));
+<<<<<<< HEAD
+
+ }
+ });
+ }
+
+ public void addListenerOnButton() {
+
+=======
+
+ }
+ });
+ }
+
+ public void addListenerOnButton() {
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ ratingBar = (RatingBar) findViewById(R.id.ratingBar);
+ btnSubmit = (Button) findViewById(R.id.btnSubmit);
+
+ //if click on me, then display the current rating value.
+ btnSubmit.setOnClickListener(new OnClickListener() {
+<<<<<<< HEAD
+
+ @Override
+ public void onClick(View v) {
+
+=======
+
+ @Override
+ public void onClick(View v) {
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ Toast.makeText(RatingActivity.this,
+ String.valueOf(ratingBar.getRating()),
+ Toast.LENGTH_SHORT).show();
+ int ratinginsert=(int) ratingBar.getRating();
+<<<<<<< HEAD
+ db.execSQL("INSERT INTO ted (NAME, RATING) VALUES ('"+path+"'," + ratinginsert +");");
+
+
+
+ }
+
+ });
+
+ }
+
+}
+=======
+ db.execSQL("INSERT INTO ted (NAME, RATING) VALUES ('"+path+"'," + ratinginsert +");");
+
+
+
+ }
+
+ });
+
+ }
+
+}
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
diff --git a/Ted/src/fr/xgouchet/texteditor/SendEmailActivity.java b/Ted/src/fr/xgouchet/texteditor/SendEmailActivity.java
new file mode 100644
index 0000000..b5be3da
--- /dev/null
+++ b/Ted/src/fr/xgouchet/texteditor/SendEmailActivity.java
@@ -0,0 +1,104 @@
+package fr.xgouchet.texteditor;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.EditText;
+<<<<<<< HEAD
+
+public class SendEmailActivity extends Activity {
+
+=======
+
+public class SendEmailActivity extends Activity {
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ Button buttonSend;
+ EditText textTo;
+ EditText textSubject;
+ EditText textMessage;
+ String message="";
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.mail);
+<<<<<<< HEAD
+
+ //add the text of the Ted editor in the mail
+=======
+
+ //add the text of the Ted editor in the mail
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ Bundle extras = getIntent().getExtras();
+ message="";
+ if(extras !=null)
+ {
+ message = extras.getString("textofmail");
+ }
+ buttonSend = (Button) findViewById(R.id.buttonSend);
+ textTo = (EditText) findViewById(R.id.editTextTo);
+ textSubject = (EditText) findViewById(R.id.editTextSubject);
+ textMessage = (EditText) findViewById(R.id.editTextMessage);
+ int start = textMessage.getSelectionStart();
+ int end = textMessage.getSelectionEnd();
+ textMessage.getText().replace(Math.min(start, end), Math.max(start, end),
+ message, 0, message.length());
+<<<<<<< HEAD
+
+
+ //send email button
+ buttonSend.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+=======
+
+
+ //send email button
+ buttonSend.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+
+ String to = textTo.getText().toString();
+ String subject = textSubject.getText().toString();
+ String messagetext=textMessage.getText().toString();
+ Intent email = new Intent(Intent.ACTION_SEND);
+ email.putExtra(Intent.EXTRA_EMAIL, new String[]{ to});
+ //email.putExtra(Intent.EXTRA_CC, new String[]{ to});
+ //email.putExtra(Intent.EXTRA_BCC, new String[]{to});
+ email.putExtra(Intent.EXTRA_SUBJECT, subject);
+ email.putExtra(Intent.EXTRA_TEXT, messagetext);
+<<<<<<< HEAD
+
+ //need this to prompts email client only
+ email.setType("message/rfc822");
+
+ startActivity(Intent.createChooser(email, "Choose an Email client :"));
+
+=======
+
+ //need this to prompts email client only
+ email.setType("message/rfc822");
+
+ startActivity(Intent.createChooser(email, "Choose an Email client :"));
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ }
+ });
+ }
+ protected void onResume() {
+ super.onResume();
+
+ }
+<<<<<<< HEAD
+}
+=======
+}
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
diff --git a/Ted/src/fr/xgouchet/texteditor/SendSMSActivity.java b/Ted/src/fr/xgouchet/texteditor/SendSMSActivity.java
new file mode 100644
index 0000000..f82551e
--- /dev/null
+++ b/Ted/src/fr/xgouchet/texteditor/SendSMSActivity.java
@@ -0,0 +1,99 @@
+package fr.xgouchet.texteditor;
+
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.telephony.SmsManager;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+<<<<<<< HEAD
+
+public class SendSMSActivity extends Activity {
+
+=======
+
+public class SendSMSActivity extends Activity {
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ Button buttonSend;
+ EditText textPhoneNo;
+ EditText textSMS;
+ String message;
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.sms);
+<<<<<<< HEAD
+
+ buttonSend = (Button) findViewById(R.id.buttonSend);
+ textPhoneNo = (EditText) findViewById(R.id.editTextPhoneNo);
+ textSMS = (EditText) findViewById(R.id.editTextSMS);
+
+=======
+
+ buttonSend = (Button) findViewById(R.id.buttonSend);
+ textPhoneNo = (EditText) findViewById(R.id.editTextPhoneNo);
+ textSMS = (EditText) findViewById(R.id.editTextSMS);
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ //add the text of the Ted editor in the sms
+ Bundle extras = getIntent().getExtras();
+ message="";
+ if(extras !=null)
+ {
+ message = extras.getString("textofsms");
+ }
+ int start = textSMS.getSelectionStart();
+ int end = textSMS.getSelectionEnd();
+ textSMS.getText().replace(Math.min(start, end), Math.max(start, end),
+ message, 0, message.length());
+<<<<<<< HEAD
+
+ //send button
+ buttonSend.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+ String phoneNo = textPhoneNo.getText().toString();
+ String sms = textSMS.getText().toString();
+
+=======
+
+ //send button
+ buttonSend.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+ String phoneNo = textPhoneNo.getText().toString();
+ String sms = textSMS.getText().toString();
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ try {
+ SmsManager smsManager = SmsManager.getDefault();
+ smsManager.sendTextMessage(phoneNo, null, sms, null, null);
+ Toast.makeText(getApplicationContext(), "SMS Sent!",
+ Toast.LENGTH_LONG).show();
+ } catch (Exception e) {
+ Toast.makeText(getApplicationContext(),
+ "SMS faild, please try again later!",
+ Toast.LENGTH_LONG).show();
+ e.printStackTrace();
+ }
+<<<<<<< HEAD
+
+ }
+ });
+ }
+}
+=======
+
+ }
+ });
+ }
+}
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
diff --git a/Ted/src/fr/xgouchet/texteditor/TedActivity.java b/Ted/src/fr/xgouchet/texteditor/TedActivity.java
index 9363a71..d5f1742 100755
--- a/Ted/src/fr/xgouchet/texteditor/TedActivity.java
+++ b/Ted/src/fr/xgouchet/texteditor/TedActivity.java
@@ -258,8 +258,16 @@ public boolean onPrepareOptionsMenu(Menu menu) {
addMenuItem(menu, MENU_ID_SETTINGS, R.string.menu_settings, 0);
+ addMenuItem(menu, MENU_ID_EMAIL,R.string.menu_email,0);
+
+ addMenuItem(menu, MENU_ID_SMS,R.string.menu_sms,0);
+
+ addMenuItem(menu, MENU_ID_RATING, R.string.menu_rating, 0);
+
addMenuItem(menu, MENU_ID_ABOUT, R.string.menu_about, 0);
+
+
if (Settings.BACK_BTN_AS_UNDO && Settings.UNDO)
addMenuItem(menu, MENU_ID_QUIT, R.string.menu_quit, 0);
@@ -305,6 +313,15 @@ public boolean onOptionsItemSelected(MenuItem item) {
case MENU_ID_QUIT:
quit();
return true;
+ case MENU_ID_EMAIL:
+ email();
+ return true;
+ case MENU_ID_SMS:
+ sms();
+ return true;
+ case MENU_ID_RATING:
+ rating();
+ return true;
case MENU_ID_UNDO:
if (!undo()) {
Crouton.showText(this, R.string.toast_warn_no_undo, Style.INFO);
@@ -956,6 +973,40 @@ protected void aboutActivity() {
}
}
+ protected void email() {
+ Intent mail = new Intent();
+ mail.setClass(this, SendEmailActivity.class);
+ try {
+ mail.putExtra("textofmail", mEditor.getText().toString());
+ startActivity(mail);
+ } catch (ActivityNotFoundException e) {
+ Crouton.showText(this, R.string.toast_activity_email, Style.ALERT);
+
+ }
+ }
+ protected void sms() {
+ Intent sms = new Intent();
+ sms.setClass(this, SendSMSActivity.class);
+ try {
+ sms.putExtra("textofsms", mEditor.getText().toString());
+ startActivity(sms);
+ } catch (ActivityNotFoundException e) {
+ Crouton.showText(this, R.string.toast_activity_sms, Style.ALERT);
+
+ }
+ }
+
+ protected void rating() {
+ Intent rating = new Intent();
+ rating.setClass(this, RatingActivity.class);
+ try {
+ startActivity(rating);
+ } catch (ActivityNotFoundException e) {
+ Crouton.showText(this, R.string.toast_activity_rating, Style.ALERT);
+
+ }
+ }
+
/**
* Opens the settings activity
*/
@@ -1005,7 +1056,7 @@ else if (mDirty)
/** the text editor */
protected AdvancedEditText mEditor;
/** the path of the file currently opened */
- protected String mCurrentFilePath;
+ protected static String mCurrentFilePath;
/** the name of the file currently opened */
protected String mCurrentFileName;
/** the runable to run after a save */
diff --git a/Ted/src/fr/xgouchet/texteditor/TedSaveAsActivity.java b/Ted/src/fr/xgouchet/texteditor/TedSaveAsActivity.java
index eb6b167..1a7c466 100755
--- a/Ted/src/fr/xgouchet/texteditor/TedSaveAsActivity.java
+++ b/Ted/src/fr/xgouchet/texteditor/TedSaveAsActivity.java
@@ -3,6 +3,9 @@
import static fr.xgouchet.androidlib.ui.Toaster.showToast;
import java.io.File;
+import java.util.regex.Pattern;
+import java.util.Arrays;
+import java.util.List;
import android.content.Intent;
import android.graphics.drawable.Drawable;
@@ -11,6 +14,7 @@
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
+import android.widget.RadioButton;
import fr.xgouchet.androidlib.ui.activity.AbstractBrowsingActivity;
import fr.xgouchet.texteditor.common.Constants;
@@ -96,20 +100,46 @@ protected boolean setSaveResult() {
return false;
}
+
fileName = mFileName.getText().toString();
if (fileName.length() == 0) {
showToast(this, R.string.toast_filename_empty, true);
return false;
}
-
+
+ //automatically add txt as extension if the application doesn't find a known extension
+ String extension="";
+ int dotposition= fileName.lastIndexOf(".");
+ extension = fileName.substring(dotposition + 1, fileName.length());
+
+ List list = Arrays.asList("doc", "docx", "log", "ascii", "txt", "html", "htm", "lst", "odt", "upd", "readme", "awp", "awt", "bean","php","ini","sh","js","db","conf","cfg");
+
+ if (!(list.contains(extension)))
+ {
+ fileName+=".txt";
+ }
+
+ //save result
result = new Intent();
result.putExtra("path", mCurrentFolder.getAbsolutePath()
+ File.separator + fileName);
-
+
setResult(RESULT_OK, result);
+
+ //make file read-only if the radio button is checked
+ File file = new File(mCurrentFolder.getAbsolutePath()
+ + File.separator + fileName);
+ RadioButton readOnly;
+
+ readOnly = (RadioButton) findViewById(R.id.readonly);
+
+ if (readOnly.isChecked()) {
+ file.setWritable(false);
+ }
return true;
}
+
/** the edit text input */
protected EditText mFileName;
diff --git a/Ted/src/fr/xgouchet/texteditor/TedSettingsActivity.java b/Ted/src/fr/xgouchet/texteditor/TedSettingsActivity.java
index 8404d66..0426848 100755
--- a/Ted/src/fr/xgouchet/texteditor/TedSettingsActivity.java
+++ b/Ted/src/fr/xgouchet/texteditor/TedSettingsActivity.java
@@ -155,6 +155,9 @@ protected void updateSummaries() {
listPref = (ListPreference) findPreference(PREFERENCE_TEXT_SIZE);
listPref.setSummary(listPref.getEntry());
+
+ listPref = (ListPreference) findPreference(PREFERENCE_BOLD_ITALIC);
+ listPref.setSummary(listPref.getEntry());
listPref = (ListPreference) findPreference(PREFERENCE_END_OF_LINES);
listPref.setSummary(listPref.getEntry());
diff --git a/Ted/src/fr/xgouchet/texteditor/common/Constants.java b/Ted/src/fr/xgouchet/texteditor/common/Constants.java
index 406f4d9..93bc75f 100755
--- a/Ted/src/fr/xgouchet/texteditor/common/Constants.java
+++ b/Ted/src/fr/xgouchet/texteditor/common/Constants.java
@@ -40,6 +40,12 @@ public interface Constants {
public static final int MENU_ID_UNDO = 8;
/** redo last change ( = {@value} ) */
public static final int MENU_ID_REDO = 9;
+ /** send mail ( = {@value} ) */
+ public static final int MENU_ID_EMAIL = 10;
+ /** send sms ( = {@value} ) */
+ public static final int MENU_ID_SMS = 11;
+ /** add rating ( = {@value} ) */
+ public static final int MENU_ID_RATING = 12;
/** Quit the app ( = {@value} ) */
public static final int MENU_ID_QUIT = 666;
@@ -69,6 +75,8 @@ public interface Constants {
public static final String PREFERENCE_HIGHLIGHT = "highlight_syntax";
/** Preference tag to retrieve the Text Size ( = {@value} ) */
public static final String PREFERENCE_TEXT_SIZE = "text_size";
+ /** Preference tag to retrieve the BOLD_ITALIC ( = {@value} ) */
+ public static final String PREFERENCE_BOLD_ITALIC = "text_style";
/** Preference tag to retrieve the End of lines pref ( = {@value} ) */
public static final String PREFERENCE_END_OF_LINES = "end_of_lines";
/** Preference tag to retrieve the Encoding pref ( = {@value} ) */
@@ -126,6 +134,20 @@ public interface Constants {
/** color theme dracula : red on black ( = {@value} ) */
public static final int COLOR_DRACULA = 4;
+
+ /** by default */
+ public static final int NORMAL = 0;
+ /** bold italic */
+ public static final int BOLD_ITALIC = 3;
+ /** bold */
+ public static final int BOLD = 1;
+ /** italic */
+ public static final int ITALIC = 2;
+
+
+
+
+
/** Request code for Save As Activity */
public static final int REQUEST_SAVE_AS = 107;
/** Request code for Open Activity */
diff --git a/Ted/src/fr/xgouchet/texteditor/common/Settings.java b/Ted/src/fr/xgouchet/texteditor/common/Settings.java
index 3f64595..98fbc72 100755
--- a/Ted/src/fr/xgouchet/texteditor/common/Settings.java
+++ b/Ted/src/fr/xgouchet/texteditor/common/Settings.java
@@ -26,6 +26,9 @@ public class Settings implements Constants {
/** Text size setting */
public static int TEXT_SIZE = 12;
+
+ /** Text change */
+ public static int NORMAL = 0;
/** Default end of line */
public static int DEFAULT_END_OF_LINE = EOL_LINUX;
@@ -83,6 +86,8 @@ public static void updateFromPreferences(SharedPreferences settings) {
WORDWRAP = settings.getBoolean(PREFERENCE_WORDWRAP, false);
TEXT_SIZE = getStringPreferenceAsInteger(settings,
PREFERENCE_TEXT_SIZE, "12");
+ NORMAL = getStringPreferenceAsInteger(settings,
+ PREFERENCE_BOLD_ITALIC,("" + NORMAL));
DEFAULT_END_OF_LINE = getStringPreferenceAsInteger(settings,
PREFERENCE_END_OF_LINES, ("" + EOL_LINUX));
FORCE_AUTO_SAVE = settings.getBoolean(PREFERENCE_AUTO_SAVE, false);
@@ -167,3 +172,4 @@ public static Typeface getTypeface(Context ctx) {
return res;
}
}
+
diff --git a/Ted/src/fr/xgouchet/texteditor/common/TextFileUtils.java b/Ted/src/fr/xgouchet/texteditor/common/TextFileUtils.java
index c565405..66d124c 100755
--- a/Ted/src/fr/xgouchet/texteditor/common/TextFileUtils.java
+++ b/Ted/src/fr/xgouchet/texteditor/common/TextFileUtils.java
@@ -11,7 +11,6 @@
import java.io.OutputStreamWriter;
import fr.xgouchet.texteditor.BuildConfig;
-import org.mozilla.universalchardet.UniversalDetector;
import android.content.Context;
import android.util.Log;
@@ -67,7 +66,7 @@ public static String readTextFile(File file) {
int c;
try {
reader = new InputStreamReader(new FileInputStream(file),
- detectCharSet(file.getAbsolutePath()));
+ Settings.ENCODING);
in = new BufferedReader(reader);
do {
c = in.read();
@@ -166,30 +165,4 @@ public static String readInternal(Context context) {
public static void clearInternal(Context context) {
writeInternal(context, "");
}
-
- /**
- * Detect charset
- * @see https://code.google.com/p/juniversalchardet/
- * @param fileName
- * the absolute path of the file to open
- * @return charset name
- *
- * */
- public static String detectCharSet(String fileName) throws IOException {
- byte[] buf = new byte[4096];
- FileInputStream fis = new FileInputStream(fileName);
-
- UniversalDetector detector = new UniversalDetector(null);
-
- int nread;
- while ((nread = fis.read(buf)) > 0 && !detector.isDone()) {
- detector.handleData(buf, 0, nread);
- }
- detector.dataEnd();
-
- String encoding = detector.getDetectedCharset();
-
- detector.reset();
- return encoding;
- }
}
diff --git a/Ted/src/fr/xgouchet/texteditor/ui/view/AdvancedEditText.java b/Ted/src/fr/xgouchet/texteditor/ui/view/AdvancedEditText.java
index 19807a8..e82cbb3 100644
--- a/Ted/src/fr/xgouchet/texteditor/ui/view/AdvancedEditText.java
+++ b/Ted/src/fr/xgouchet/texteditor/ui/view/AdvancedEditText.java
@@ -228,7 +228,7 @@ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
/**
* Update view settings from the app preferences
- *
+ *
* @category Custom
*/
public void updateFromSettings() {
@@ -236,12 +236,43 @@ public void updateFromSettings() {
if (isInEditMode()) {
return;
}
-
setTypeface(Settings.getTypeface(getContext()));
// wordwrap
setHorizontallyScrolling(!Settings.WORDWRAP);
+<<<<<<< HEAD
+
+//bold_italic_underline
+ switch (Settings.NORMAL) {
+
+=======
+
+//bold_italic_underline
+ switch (Settings.NORMAL) {
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
+ case BOLD:
+ //setTypeface(Settings.getTypeface(getContext()));
+ setTypeface(null, Typeface.BOLD);
+ break;
+ case ITALIC:
+ //setTypeface(Settings.getTypeface(getContext()));
+ setTypeface(null, Typeface.ITALIC);
+ break;
+ case BOLD_ITALIC:
+ //setTypeface(Settings.getTypeface(getContext()));
+ setTypeface(null, Typeface.BOLD_ITALIC);
+ break;
+ default:
+ setTypeface(null, Typeface.NORMAL);
+ break;
+<<<<<<< HEAD
+ }
+=======
+ }
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
// color Theme
switch (Settings.COLOR) {
case COLOR_NEGATIVE:
@@ -282,6 +313,11 @@ public void updateFromSettings() {
setTextSize(Settings.TEXT_SIZE);
mPaintNumbers.setTextSize(Settings.TEXT_SIZE * mScale * 0.85f);
+<<<<<<< HEAD
+
+=======
+
+>>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
// refresh view
postInvalidate();
refreshDrawableState();
@@ -363,4 +399,4 @@ protected void computeLineHighlight() {
protected int mHighlightStart;
protected Rect mDrawingRect, mLineBounds;
-}
+}
From 9fbbf5a9e4b7e2ad253188bb8a83c1ef40625dce Mon Sep 17 00:00:00 2001
From: Pavlos Siaperas
Date: Tue, 4 Jun 2013 22:18:20 +0300
Subject: [PATCH 4/4] classpath fix
---
Ted/.classpath | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/Ted/.classpath b/Ted/.classpath
index ef2d30c..a7f4ccf 100644
--- a/Ted/.classpath
+++ b/Ted/.classpath
@@ -1,5 +1,3 @@
-<<<<<<< HEAD
-<<<<<<< HEAD
@@ -8,30 +6,4 @@
-<<<<<<< HEAD
-=======
-
->>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
-=======
-
-
-
-
-
-
-
-
-
->>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361
-=======
-
-
-
-
-
-
-
-
-
->>>>>>> 2c6f4c24e20f894028726ec87f4c3191b0fd7361