diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7591c3d..0000000 --- a/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -**/.idea/dictionaries -**/.idea/gradle.xml -**/.idea/libraries -**/.idea/tasks.xml -**/.idea/workspace.xml -*.iws -.DS_Store -.classpath -.gradle -.nb-gradle -.project -.settings -/.classpath -/.fbprefs -/.pmd -/.project -/.svn/ -/bin -/build -/deploy -/dist -/gen -/local.properties -/out -/proguard-project.txt -/project.properties -/test-output -Thumbs.db -ehthumbs.db \ No newline at end of file diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6734ae1..2b841d5 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,29 +1,16 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file + package="net.thauvin.erik.android.googsms" android:installLocation="auto" + android:versionName="0.2" android:versionCode="2"> + + + + + + + + + + + + \ No newline at end of file diff --git a/gen/net/thauvin/erik/android/googsms/R.java b/gen/net/thauvin/erik/android/googsms/R.java index 36dae30..7d16384 100644 --- a/gen/net/thauvin/erik/android/googsms/R.java +++ b/gen/net/thauvin/erik/android/googsms/R.java @@ -31,29 +31,30 @@ public final class R { public static final int main=0x7f030001; } public static final class string { - public static final int about_menu_txt=0x7f060009; - public static final int about_txt=0x7f060008; - public static final int alert_dialog_ok=0x7f06000b; - public static final int app_name=0x7f060000; - public static final int default_google_sms=0x7f060007; - public static final int main_location_err_txt=0x7f060006; - public static final int main_query_err_txt=0x7f060005; - public static final int main_query_lbl_txt=0x7f060001; - public static final int main_send_btn_txt=0x7f060003; - public static final int main_sms_sent_txt=0x7f060004; - public static final int main_type_lbl_txt=0x7f060002; - public static final int prefs_dialog_title=0x7f06000c; - public static final int prefs_key_loc=0x7f060016; - public static final int prefs_key_sms=0x7f060015; - public static final int prefs_location_dialog_title=0x7f06000d; - public static final int prefs_location_hint=0x7f060010; - public static final int prefs_location_summary=0x7f06000f; - public static final int prefs_location_title=0x7f06000e; - public static final int prefs_menu_txt=0x7f06000a; - public static final int prefs_sms_dialog_title=0x7f060011; - public static final int prefs_sms_hint=0x7f060014; - public static final int prefs_sms_summary=0x7f060013; - public static final int prefs_sms_title=0x7f060012; + public static final int about_menu_txt=0x7f06000a; + public static final int about_txt=0x7f060009; + public static final int alert_dialog_ok=0x7f06000c; + public static final int app_name=0x7f060001; + public static final int default_google_sms=0x7f060008; + public static final int hello=0x7f060000; + public static final int main_location_err_txt=0x7f060007; + public static final int main_query_err_txt=0x7f060006; + public static final int main_query_lbl_txt=0x7f060002; + public static final int main_send_btn_txt=0x7f060004; + public static final int main_sms_sent_txt=0x7f060005; + public static final int main_type_lbl_txt=0x7f060003; + public static final int prefs_dialog_title=0x7f06000d; + public static final int prefs_key_loc=0x7f060017; + public static final int prefs_key_sms=0x7f060016; + public static final int prefs_location_dialog_title=0x7f06000e; + public static final int prefs_location_hint=0x7f060011; + public static final int prefs_location_summary=0x7f060010; + public static final int prefs_location_title=0x7f06000f; + public static final int prefs_menu_txt=0x7f06000b; + public static final int prefs_sms_dialog_title=0x7f060012; + public static final int prefs_sms_hint=0x7f060015; + public static final int prefs_sms_summary=0x7f060014; + public static final int prefs_sms_title=0x7f060013; } public static final class xml { public static final int prefs=0x7f040000; diff --git a/res/layout/main.xml b/res/layout/main.xml index e6cd564..a31ec84 100644 --- a/res/layout/main.xml +++ b/res/layout/main.xml @@ -1,53 +1,26 @@ + android:orientation="vertical" android:layout_width="fill_parent" + android:layout_height="fill_parent" android:padding="10dip"> - - + - - + + + - - - - - - - - - - - - \ No newline at end of file + + + + diff --git a/res/values/arrays.xml b/res/values/arrays.xml index b14b43b..12e1b84 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -1,68 +1,86 @@ + + Search + Web Snippets + Local Search + Local Movies + Local Weather + Airlines + Airports + Area Codes + Calculator + Currency Conversion + Directions + Flights + Glossary + METAR + Maps + Movies + Products + Q&A + Sports + Stocks + Time + Translation + Weather + Zip Codes + Help + - - Search - Web Snippets - Local Search - Local Movies - Local Weather - Calculator - Currency Conversion - Directions - Glossary - Maps - Movies - Products - Sports - Stocks - Time - Translation - Weather - Zip Codes - Help - - - %s - WEB %s - %s %l - MOVIES %%s %l - WEATHER %l - %s - %s - DIRECTIONS %s - DEFINE %s - MAP %s - %s - PRICE %s - SCORE %s - STOCK %s - TIME %s - TRANSLATE %s - WEATHER %s - ZIP CODE %s - HELP %s - - - blockbuster seattle wa - search terms, e.g.: galaxy nexus - business listing, sushi, pizza, etc. - No query or current movie name - No query required - 1 us pint in liters, 5+2/2, etc. - 8 usd in yen - pasadena ca to 94043 - word to define, e.g.: zenith - 5th avenue new york - current movie name boston, ma - ipod 40gb, UPC/ISBN, etc. - NBA/NHL/MLB/NFL/NCAA team - ticker symbol, e.g.: goog - new york, ny - hello in french - new york, ny - 90210 - search feature, e.g.: local, etc. - + + %s + web %s + %s %l + movies %%s %l + weather %l + %s + %s airport + area code %s + %s + %s + directions %s + flight %s + define %s + metar %s + map %s + movies %s + price %s + %s + score %s + stock %s + time %s + translate %s + weather %s + zip code %s + help %s + - \ No newline at end of file + + blockbuster seattle wa + search terms, e.g.: nexus one + business listing, sushi, pizza, etc. + No query or current movie name + No query required + united airlines + airport code, e.g.: sfo + area code, e.g.: 650 + 1 us pint in liters, 5+2/2, etc. + 8 usd in yen + pasadena ca to 94043 + aa 2111, ua 14, etc. + word to define, e.g.: zenith + ICAO airport code, e.g.: khio + 5th avenue new york + current movie name boston, ma + ipod 40gb, UPC/ISBN, etc. + india population + NBA/NHL/MLB/NFL/NCAA team + ticker symbol, e.g.: goog + new york, ny + hello in french + new york, ny + 90210 + search feature, e.g.: local, etc. + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 2e7f85d..b7fd93c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,28 +1,27 @@ - - GoogSMS - Query: - Type: - Send via SMS - Your message was sent. - Please enter a query! - Please set your location… - 466453 - © 2008–12 Erik C. Thauvin\nAll Rights Reserved\n\nerik@thauvin.net\nhttp://m.thauvin.net/android/ - About - Preferences - OK - Preferences - Set Your Location… - Location - Your current city and state or zip. - e.g.: san francisco ca or 94123 - Set SMS Number… - Google SMS - The short code or number of the Google SMS service. - e.g.: 466453 - prefs_sms - prefs_loc - - \ No newline at end of file + Hello World, GoogSMS + GoogSMS + Query: + Type: + Send via SMS + Your message was sent. + Please enter a query... + Please set your location... + 466453 + © 2008-10 Erik C. Thauvin\nAll Rights Reserved\n\nerik@thauvin.net\n\nhttp://mobile.thauvin.net/ + About + Preferences + OK + Preferences + Set Your Location... + Location + Your current city and state or zip. + e.g.: san francisco ca or 94123 + Set SMS Number... + Google SMS + The short code or number of the Google SMS service. + e.g.: 466453 + prefs_sms + prefs_loc + diff --git a/screenshots/feature.png b/screenshots/feature.png deleted file mode 100644 index f8014ee..0000000 Binary files a/screenshots/feature.png and /dev/null differ diff --git a/screenshots/icon-hi.png b/screenshots/icon-hi.png deleted file mode 100644 index 7a7b7fb..0000000 Binary files a/screenshots/icon-hi.png and /dev/null differ diff --git a/screenshots/promo.png b/screenshots/promo.png deleted file mode 100644 index 90f3011..0000000 Binary files a/screenshots/promo.png and /dev/null differ diff --git a/src/net/thauvin/erik/android/googsms/GoogSMS.java b/src/net/thauvin/erik/android/googsms/GoogSMS.java index 44d97f9..2e8367d 100644 --- a/src/net/thauvin/erik/android/googsms/GoogSMS.java +++ b/src/net/thauvin/erik/android/googsms/GoogSMS.java @@ -31,7 +31,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: GoogSMS.java 81 2010-06-29 12:59:19Z erik $ + * $Id$ * */ package net.thauvin.erik.android.googsms; @@ -46,32 +46,26 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager.NameNotFoundException; -import android.graphics.drawable.Drawable; import android.os.Bundle; import android.telephony.gsm.SmsManager; import android.text.ClipboardManager; -import android.text.Editable; import android.text.TextUtils; -import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; -import android.view.MotionEvent; import android.view.View; -import android.view.View.OnTouchListener; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.AutoCompleteTextView; import android.widget.Button; import android.widget.Spinner; -import android.widget.TextView; import android.widget.Toast; /** * The GoogSMS class implements a simple front-end for Google SMS. * * @author Erik C. Thauvin - * @version $Revision: 81 $, $Date: 2010-06-29 05:59:19 -0700 (Tue, 29 Jun 2010) $ + * @version $Revision$, $Date$ * @created Nov 2, 2008 * @since 1.0 */ @@ -79,7 +73,7 @@ import android.widget.Toast; public class GoogSMS extends Activity { private static final boolean DEBUG = false; - + private static final int MAX_HISTORY_SIZE = 15; private static final int MENU_ABOUT = 0; private static final int MENU_PREFS = 1; @@ -204,58 +198,6 @@ public class GoogSMS extends Activity } }); - final Drawable imgX = getResources().getDrawable(android.R.drawable.presence_offline); - - manageClearButton(queryFld, imgX); - - queryFld.setOnTouchListener(new OnTouchListener() - { - @Override - public boolean onTouch(View v, MotionEvent event) - { - // Is there an X showing? - if (queryFld.getCompoundDrawables()[2] == null) - { - return false; - } - - // Only do this for up touches - if (event.getAction() != MotionEvent.ACTION_UP) - { - return false; - } - - // Is touch on our clear button? - if (event.getX() > queryFld.getWidth() - queryFld.getPaddingRight() - imgX.getIntrinsicWidth()) - { - queryFld.requestFocusFromTouch(); - queryFld.setText(""); - } - return false; - } - }); - - queryFld.addTextChangedListener(new TextWatcher() - { - @Override - public void onTextChanged(CharSequence s, int start, int before, int count) - { - manageClearButton(queryFld, imgX); - } - - @Override - public void afterTextChanged(Editable s) - { - - } - - @Override - public void beforeTextChanged(CharSequence s, int start, int count, int after) - { - - } - }); - sendBtn.setOnClickListener(new Button.OnClickListener() { public void onClick(View view) @@ -380,9 +322,9 @@ public class GoogSMS extends Activity final LayoutInflater factory = LayoutInflater.from(this); final View aboutView = factory.inflate(R.layout.about, null); - new AlertDialog.Builder(this).setView(aboutView).setIcon(android.R.drawable.ic_dialog_info) - .setTitle(getString(R.string.app_name) + ' ' + getVersionNumber()) - .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() + new AlertDialog.Builder(this).setView(aboutView).setIcon(android.R.drawable.ic_dialog_info).setTitle( + getString(R.string.app_name) + ' ' + getVersionNumber()).setPositiveButton(R.string.alert_dialog_ok, + new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { @@ -452,24 +394,4 @@ public class GoogSMS extends Activity { mSmsNumber = smsNumber; } - - /** - * Manages the clear button. - * - * @param view The text view. - * @param img The image. - */ - private void manageClearButton(TextView view, Drawable img) - { - if (view.getText().toString().equals("")) - { - view.setCompoundDrawablesWithIntrinsicBounds(view.getCompoundDrawables()[0], view.getCompoundDrawables()[1], null, - view.getCompoundDrawables()[3]); - } - else - { - view.setCompoundDrawablesWithIntrinsicBounds(view.getCompoundDrawables()[0], view.getCompoundDrawables()[1], img, - view.getCompoundDrawables()[3]); - } - } } \ No newline at end of file