Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing adding possibility to send email, send sms, add rating system with addition of database #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Ted/.classpath
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="lib" path="./libs/juniversalchardet-1.0.3.jar"/>
<classpathentry kind="output" path="bin/classes"/>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="lib" path="./libs/juniversalchardet-1.0.3.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
27 changes: 24 additions & 3 deletions Ted/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
android:installLocation="auto"
android:versionCode="19"
android:versionName="Release 1.8.1" >

<uses-sdk
android:minSdkVersion="8"
android:minSdkVersion="9"
android:targetSdkVersion="16" />

<permission
Expand All @@ -17,7 +17,8 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="fr.xgouchet.texteditor.permission.TED_INTERNAL" />

<uses-permission android:name="android.permission.SEND_SMS" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
Expand Down Expand Up @@ -107,6 +108,7 @@
android:name=".TedSettingsActivity"
android:label="@string/title_settings"
android:windowSoftInputMode="stateHidden" >

</activity>

<!-- Ted save as activity -->
Expand Down Expand Up @@ -152,6 +154,24 @@
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<activity
android:label="@string/title_mail"
android:name=".SendEmailActivity"
android:windowSoftInputMode="stateHidden" >

</activity>
<activity
android:label="@string/title_sms"
android:name=".SendSMSActivity"
android:windowSoftInputMode="stateHidden" >

</activity>
<activity
android:label="@string/title_rating"
android:name=".RatingActivity"
android:windowSoftInputMode="stateHidden" >

</activity>

<!-- Widget Receiver -->
<receiver
Expand All @@ -166,5 +186,6 @@
android:resource="@xml/ted_widget" />
</receiver>
</application>


</manifest>
3 changes: 3 additions & 0 deletions Ted/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
</lint>
25 changes: 16 additions & 9 deletions Ted/res/layout/layout_save_as.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,28 @@
android:layout_height="match_parent"
android:orientation="vertical" >

<EditText
android:id="@+id/editFileName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/folder_rw"
android:drawablePadding="8dp"
android:ems="10"
android:hint="@string/ui_hint_file_name"
android:inputType="text" />

<RadioButton
android:id="@+id/readonly"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Read-Only" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" >

<EditText
android:id="@+id/editFileName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/folder_rw"
android:drawablePadding="8dp"
android:hint="@string/ui_hint_file_name"
android:inputType="text" >
</EditText>
</LinearLayout>

<ListView
Expand Down
59 changes: 59 additions & 0 deletions Ted/res/layout/mail.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:id="@+id/textViewPhoneNo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="To : "
android:textAppearance="?android:attr/textAppearanceLarge" />

<EditText
android:id="@+id/editTextTo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress" >

<requestFocus />
</EditText>

<TextView
android:id="@+id/textViewSubject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Subject : "
android:textAppearance="?android:attr/textAppearanceLarge" />

<EditText
android:id="@+id/editTextSubject"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</EditText>

<TextView
android:id="@+id/textViewMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Message : "
android:textAppearance="?android:attr/textAppearanceLarge" />

<EditText
android:id="@+id/editTextMessage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.64"
android:gravity="top"
android:inputType="textMultiLine"
android:lines="5" />

<Button
android:id="@+id/buttonSend"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Send" />

</LinearLayout>
49 changes: 49 additions & 0 deletions Ted/res/layout/rating.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:id="@+id/lblRateMe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Rate Me"
android:textAppearance="?android:attr/textAppearanceMedium" />

<RatingBar
android:id="@+id/ratingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:stepSize="1.0"
android:rating="2.0" />

<Button
android:id="@+id/btnSubmit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Submit" />

<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/lblResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Result : "
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/txtRatingValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textAppearance="?android:attr/textAppearanceSmall" />

</LinearLayout>

</LinearLayout>
44 changes: 44 additions & 0 deletions Ted/res/layout/sms.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:id="@+id/textViewPhoneNo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enter Phone Number : "
android:textAppearance="?android:attr/textAppearanceLarge" />

<EditText
android:id="@+id/editTextPhoneNo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:phoneNumber="true" >
</EditText>

<TextView
android:id="@+id/textViewSMS"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enter SMS Message : "
android:textAppearance="?android:attr/textAppearanceLarge" />

<EditText
android:id="@+id/editTextSMS"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.94"
android:gravity="top"
android:inputType="textMultiLine"
android:lines="5" />

<Button
android:id="@+id/buttonSend"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Send" />

</LinearLayout>
19 changes: 17 additions & 2 deletions Ted/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
<item>4</item>
</string-array>

<!-- Text size -->
<string-array name="text_size_names">
<!-- Text size --><string-array name="text_size_names">
<item>6 pt</item>
<item>8 pt</item>
<item>10 pt</item>
Expand All @@ -43,6 +42,20 @@
<item>48</item>
</string-array>

<!-- fontstyle --><string-array name="text_style_names">
<item>Normal</item>
<item>Bold</item>
<item>Italic</item>
<item>Bold_Italic</item>

</string-array>
<string-array name="text_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>

<!-- End of lines -->
<string-array name="eol_names">
<item>Android / Linux / Unix</item>
Expand Down Expand Up @@ -96,5 +109,7 @@
<item>ISO-8859-1</item>
<item>UTF-8</item>
</string-array>



</resources>
13 changes: 11 additions & 2 deletions Ted/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<string name="title_settings">Ted - Settings </string>
<string name="title_about">Ted - About ... </string>
<string name="title_font">Ted - Text Font </string>
<string name="title_mail">Ted - Email </string>
<string name="title_sms">Ted - SMS </string>
<string name="title_rating">Ted - Rating </string>

<!-- Config screen strings -->
<string name="config_cat_display">Display</string>
Expand Down Expand Up @@ -48,7 +51,9 @@
<string name="config_summary_use_home_page">Select a file to open when you launch Ted from your home screen</string>
<string name="config_summary_auto_save_overwrite_on">Auto save will overwrite existing files</string>
<string name="config_summary_auto_save_overwrite_off">Auto save will only work with new files</string>

<string name="config_title_text_font">Text Font</string>
<string name="config_title_text_style">Text style</string>

<!-- Options Menu in TED -->
<string name="menu_new">New</string>
<string name="menu_open">Open</string>
Expand All @@ -60,7 +65,10 @@
<string name="menu_search">Search</string>
<string name="menu_undo">Undo</string>
<string name="menu_quit">Quit</string>

<string name="menu_email">Email</string>
<string name="menu_sms">SMS</string>
<string name="menu_rating">Rating</string>

<!-- Misc UI strings -->
<string name="ui_save_text">"Do you want to save your document? \nAny unsaved changes will be lost. "</string>
<string name="ui_save">Save</string>
Expand All @@ -77,4 +85,5 @@
<string name="lorem_ipsum">"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."</string>
<string name="art_licence">"All icons for this app were created and belong to the author of the app : Xavier Gouchet ([email protected])."</string>


</resources>
4 changes: 4 additions & 0 deletions Ted/res/values/toasts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<string name="toast_activity_save_as">Unable to load the file browser</string>
<string name="toast_activity_settings">Unable to load the settings page</string>
<string name="toast_activity_about">Unable to load the about page</string>
<string name="toast_activity_email">Unable to load emailing page</string>
<string name="toast_activity_sms">Unable to load SMS page</string>
<string name="toast_activity_rating">Unable to load Rating page</string>
<string name="toast_memory_open">Unable to open the file, not enough memory</string>
<string name="toast_open_error">Unable to open the file (maybe the file is too big, or corrupted)</string>
<string name="toast_save_null">Unable to save, path is null</string>
Expand All @@ -32,5 +35,6 @@
<string name="toast_open_select">Select a file to open</string>
<string name="toast_home_page_select">Select a file to open when you launch Ted from your home screen</string>
<string name="toast_file_saved_auto">"The opened file was saved automatically, and will be opened at next startup"</string>


</resources>
6 changes: 6 additions & 0 deletions Ted/res/xml/ted_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
android:entryValues="@array/text_size_values"
android:key="text_size"
android:title="@string/config_title_text_size" />
<ListPreference
android:defaultValue="normal"
android:entries="@array/text_style_names"
android:entryValues="@array/text_style_values"
android:key="text_style"
android:title="@string/config_title_text_style" />

<Preference
android:key="select_font"
Expand Down
Loading