Skip to content
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
22 changes: 11 additions & 11 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="lib" path="lib/gson-1.7.1-javadoc.jar"/>
<classpathentry kind="lib" path="lib/gson-1.7.1-sources.jar"/>
<classpathentry kind="lib" path="lib/gson-1.7.1.jar"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
<?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 exported="true" kind="lib" path="lib/gson-1.7.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/gson-1.7.1-javadoc.jar"/>
<classpathentry exported="true" kind="lib" path="lib/gson-1.7.1-sources.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
20 changes: 20 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -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)

2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fahimk.readabilityclient"
android:versionCode="8"
android:versionName="2.3" >
android:versionName="2.3sh" >

<uses-sdk android:minSdkVersion="7" />

Expand Down
6 changes: 3 additions & 3 deletions res/layout/list_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:padding="10sp"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:id="@+id/listitem_domain" android:text="none"
<TextView android:id="@+id/listitem_domain" android:text="@string/none"
android:typeface="serif" android:textColor="#CD0001" android:textSize="13sp" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:id="@+id/listitem_title" android:text="none"
<TextView android:id="@+id/listitem_title" android:text="@string/none"
android:typeface="serif" android:textStyle="bold" android:textColor="#000000" android:textSize="16sp" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:id="@+id/listitem_content" android:text="none"
<TextView android:id="@+id/listitem_content" android:text="@string/none"
android:typeface="serif" android:textColor="#000000" android:textSize="14sp" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</LinearLayout>
4 changes: 2 additions & 2 deletions res/layout/login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:id="@+id/button_login" android:text="Connect Readability Account" android:layout_width="fill_parent"
<Button android:id="@+id/button_login" android:text="@string/connect_account" android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/searchButton" android:text="Read!"
<Button android:id="@+id/searchButton" android:text="@string/read"
android:layout_alignParentRight="true" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Button>
Expand Down
22 changes: 11 additions & 11 deletions res/layout/main_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:background="#E7E6E2" android:layout_width="fill_parent">
<RelativeLayout android:padding="12dp"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<Button android:id="@+id/button_readnow" android:text="Read!"
<Button android:id="@+id/button_readnow" android:text="@string/read"
android:layout_alignParentRight="true" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Button>
Expand All @@ -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" />
<TableLayout android:gravity="center_horizontal"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TableRow android:padding="12dp">
Expand All @@ -29,7 +29,7 @@
<ImageView android:id="@+id/button_bookmarks"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:src="@drawable/icon_read2" />
<TextView android:text="Bookmarks" android:layout_width="wrap_content"
<TextView android:text="@string/bookmarks" android:layout_width="wrap_content"
android:textColor="#62605D" android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout android:gravity="center"
Expand All @@ -38,7 +38,7 @@
<ImageView android:id="@+id/button_add"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:src="@drawable/icon_add" />
<TextView android:text="Add" android:layout_width="wrap_content"
<TextView android:text="@string/add" android:layout_width="wrap_content"
android:textColor="#62605D" android:layout_height="wrap_content" />
</LinearLayout>

Expand All @@ -50,7 +50,7 @@
<ImageView android:id="@+id/button_sync"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:src="@drawable/icon_sync" />
<TextView android:text="Sync" android:layout_width="wrap_content"
<TextView android:text="@string/sync" android:layout_width="wrap_content"
android:textColor="#62605D" android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout android:gravity="center"
Expand All @@ -59,7 +59,7 @@
<ImageView android:id="@+id/button_help"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:src="@drawable/icon_help" />
<TextView android:text="Help" android:layout_width="wrap_content"
<TextView android:text="@string/help" android:layout_width="wrap_content"
android:textColor="#62605D" android:layout_height="wrap_content" />
</LinearLayout>
</TableRow>
Expand All @@ -70,7 +70,7 @@
<ImageView android:id="@+id/button_settings"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:src="@drawable/icon_auth" />
<TextView android:id="@+id/text_settings" android:text="Settings"
<TextView android:id="@+id/text_settings" android:text="@string/settings"
android:textColor="#62605D" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout android:gravity="center"
Expand All @@ -79,17 +79,17 @@
<ImageView android:id="@+id/button_exit"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:src="@drawable/icon_exit" />
<TextView android:text="Exit" android:layout_width="wrap_content"
<TextView android:text="@string/exit" android:layout_width="wrap_content"
android:textColor="#62605D" android:layout_height="wrap_content" />
</LinearLayout>
</TableRow>
<TableRow>
<Button android:text="Clear Database" android:id="@+id/button_delete"
<Button android:text="@string/clear_database" android:id="@+id/button_delete"
android:layout_weight="1" android:layout_width="0dip"
android:layout_height="wrap_content" />
<Button android:text="Authorize" android:id="@+id/button_authorize"
<Button android:text="@string/authorize" android:id="@+id/button_authorize"
android:layout_weight="1" android:layout_width="0dip"
android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
</LinearLayout>
</LinearLayout>
4 changes: 2 additions & 2 deletions res/layout/tabs_bg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:background="@drawable/tab_bg_selector"
android:padding="10dp" android:gravity="center" android:orientation="vertical">
<TextView android:id="@+id/tabsText" android:layout_width="wrap_content"
android:textStyle="bold" android:typeface="serif" android:layout_height="wrap_content" android:text="Title"
android:textStyle="bold" android:typeface="serif" android:layout_height="wrap_content" android:text="@string/title"
android:textColor="@drawable/tab_text_selector"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>
6 changes: 3 additions & 3 deletions res/layout/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
<Button android:textSize="15sp" android:id="@+id/button_edit_prevtheme" android:layout_toLeftOf="@+id/text_edit_currenttheme"
android:layout_width="wrap_content"
android:textColor="#FFFFFFFF" android:layout_height="50dp" android:background="@drawable/custom_button"
android:text=" &lt;&lt; " />
android:text="@string/left_shift" />
<TextView android:textColor="#FFFFFFFF" android:id="@id/text_edit_currenttheme" android:layout_centerInParent="true"
android:text="Newspaper" android:gravity="center" android:textSize="15sp"
android:text="@string/newspaper" android:gravity="center" android:textSize="15sp"
android:layout_width="100sp"
android:layout_height="wrap_content" />
<Button android:textSize="15sp" android:id="@+id/button_edit_nexttheme" android:layout_toRightOf="@id/text_edit_currenttheme"
android:layout_width="wrap_content"
android:textColor="#FFFFFFFF" android:layout_height="50dp" android:background="@drawable/custom_button"
android:text=" &gt;&gt; " />
android:text="@string/right_shift" />
<ImageButton android:padding="5dp" android:id="@+id/button_edit_togglelinks"
android:layout_width="wrap_content" android:layout_alignParentRight="true"
android:layout_height="50dp" android:background="@drawable/custom_button"
Expand Down
15 changes: 15 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ReadIt</string>
<string name="none">none</string>
<string name="connect_account">Connect Readability Account</string>
<string name="read">Read!</string>
<string name="authorize">or authorize your readability account to access the features below</string>
<string name="bookmarks">Bookmarks</string>
<string name="add">Add</string>
<string name="sync">Sync</string>
<string name="help">Help</string>
<string name="settings">Settings</string>
<string name="exit">Exit</string>
<string name="clear_database">Clear database</string>
<string name="title">Title</string>
<string name="newspaper">Newspaper</string>
<string name="left_shift"> &lt;&lt; </string>
<string name="right_shift"> &gt;&gt; </string>
</resources>
49 changes: 8 additions & 41 deletions src/com/fahimk/readabilityclient/WebActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down