diff --git a/.classpath b/.classpath
index 58b8fbb..d63155e 100644
--- a/.classpath
+++ b/.classpath
@@ -1,11 +1,11 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..13cd203
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,20 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_STATIC_JAVA_LIBRARIES := gson
+
+LOCAL_SRC_FILES := $(call all-java-files-under,src)
+LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true
+
+LOCAL_PACKAGE_NAME := ReadIt
+
+LOCAL_PROGUARD_FLAG_FILES := proguard.cfg
+
+include $(BUILD_PACKAGE)
+
+include $(CLEAR_VARS)
+
+LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := gson:lib/gson-1.7.1.jar
+
+include $(BUILD_MULTI_PREBUILT)
+
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 25dd54a..31e1f0f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2,7 +2,7 @@
+ android:versionName="2.3sh" >
diff --git a/res/layout/list_item.xml b/res/layout/list_item.xml
index dbc0ac3..7191e0d 100644
--- a/res/layout/list_item.xml
+++ b/res/layout/list_item.xml
@@ -2,10 +2,10 @@
-
-
-
diff --git a/res/layout/login.xml b/res/layout/login.xml
index c143854..02eb1ac 100644
--- a/res/layout/login.xml
+++ b/res/layout/login.xml
@@ -2,11 +2,11 @@
-
-
diff --git a/res/layout/main_menu.xml b/res/layout/main_menu.xml
index 057bd4c..e1db5e3 100644
--- a/res/layout/main_menu.xml
+++ b/res/layout/main_menu.xml
@@ -4,7 +4,7 @@
android:background="#E7E6E2" android:layout_width="fill_parent">
-
@@ -19,7 +19,7 @@
android:layout_width="fill_parent" android:gravity="center"
android:layout_height="wrap_content" android:typeface="serif"
android:textColor="#62605D"
- android:text="or authorize your readability account to access the features below" />
+ android:text="@string/authorize" />
@@ -29,7 +29,7 @@
-
-
@@ -50,7 +50,7 @@
-
-
@@ -70,7 +70,7 @@
-
-
-
-
-
\ No newline at end of file
+
diff --git a/res/layout/tabs_bg.xml b/res/layout/tabs_bg.xml
index 74f1c75..98bb72d 100644
--- a/res/layout/tabs_bg.xml
+++ b/res/layout/tabs_bg.xml
@@ -5,7 +5,7 @@
android:background="@drawable/tab_bg_selector"
android:padding="10dp" android:gravity="center" android:orientation="vertical">
-
\ No newline at end of file
+
diff --git a/res/layout/web.xml b/res/layout/web.xml
index a924013..a070a8a 100644
--- a/res/layout/web.xml
+++ b/res/layout/web.xml
@@ -18,15 +18,15 @@
+ android:text="@string/left_shift" />
+ android:text="@string/right_shift" />
ReadIt
+ none
+ Connect Readability Account
+ Read!
+ or authorize your readability account to access the features below
+ Bookmarks
+ Add
+ Sync
+ Help
+ Settings
+ Exit
+ Clear database
+ Title
+ Newspaper
+ <<
+ >>
diff --git a/src/com/fahimk/readabilityclient/WebActivity.java b/src/com/fahimk/readabilityclient/WebActivity.java
index 97a53c1..d1b46fa 100644
--- a/src/com/fahimk/readabilityclient/WebActivity.java
+++ b/src/com/fahimk/readabilityclient/WebActivity.java
@@ -317,49 +317,16 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
}
private void showShareDialog() {
- Dialog shareDialog = new Dialog(this);
- shareDialog.setContentView(R.layout.dialog_share);
- shareDialog.setTitle("Share this article.");
- shareDialog.setCanceledOnTouchOutside(true);
- shareDialog.show();
-
- ImageButton twitterButton = (ImageButton) shareDialog.findViewById(R.id.button_share_twitter);
- ImageButton faceButton = (ImageButton) shareDialog.findViewById(R.id.button_share_facebook);
- ImageButton emailButton = (ImageButton) shareDialog.findViewById(R.id.button_share_email);
+ Intent send = new Intent(Intent.ACTION_SEND);
+ send.setType("text/plain");
+ send.putExtra(Intent.EXTRA_TEXT, "http://www.readability.com/articles/" + url);
+ send.putExtra(Intent.EXTRA_SUBJECT, title);
try {
- if(title != null) {
- title = URLEncoder.encode(title,"UTF-8");
- }
- else {
- title = URLEncoder.encode(webView.getTitle(),"UTF-8");
- }
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- }
- twitterButton.setOnClickListener(new View.OnClickListener() {
-
- public void onClick(View v) {
- Intent browserIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://twitter.com/intent/tweet?text=" + title + "&url=http%3A%2F%2Frdd.me%2F" + url + "&via=readability"));
- startActivity(browserIntent);
- }
- });
-
- faceButton.setOnClickListener(new View.OnClickListener() {
-
- public void onClick(View v) {
- Intent browserIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.readability.com%2Farticles%2F" + url));
- startActivity(browserIntent);
- }
- });
-
- emailButton.setOnClickListener(new View.OnClickListener() {
-
- public void onClick(View v) {
- Intent browserIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://www.readability.com/articles/" + url + "/email"));
- startActivity(browserIntent);
- }
- });
+ startActivity(Intent.createChooser(send, "Share article"));
+ } catch(android.content.ActivityNotFoundException ex) {
+ // if no app handles it, do nothing
+ }
}
private void updateReadPercent() {