diff --git a/res/layout/main.xml b/res/layout/main.xml
index 121116b..3dd1df5 100644
--- a/res/layout/main.xml
+++ b/res/layout/main.xml
@@ -50,13 +50,7 @@
android:layout_weight="1"
android:text="@string/btnSync" />
-
+
diff --git a/res/layout/settings.xml b/res/layout/settings.xml
index 2e519b8..62b72e6 100644
--- a/res/layout/settings.xml
+++ b/res/layout/settings.xml
@@ -33,7 +33,7 @@
android:layout_height="0dp"
android:layout_weight="2"
android:ems="10"
- android:inputType="textFilter"
+ android:inputType="textUri"
android:linksClickable="false"
android:maxLines="1"
android:scrollHorizontally="false" >
@@ -49,8 +49,7 @@
android:layout_weight="1"
android:autoLink="web"
android:paddingTop="5sp"
- android:text="@string/instructions"
- android:textSize="22sp" />
+ android:text="@string/instructions" />
+
+
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 64c2240..9df7fce 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3,7 +3,7 @@
In the poche !
In the poche
Add in the poche
- By GAULUPEAU Jonathan
+ GAULUPEAU Jonathan - 2013
To save a web page to poche, open the page in a browser then tap Share and tap on In the poche. \nYou could then see your Poche login page. \nAnd it\'s done ! \nMore infos about poche at http://www.inthepoche.com
Save
Which browser would you like to use?
@@ -11,7 +11,7 @@
Your poche URL :
Examples:\nhttp://poche.example.fr\nhttp://www.example.fr/poche
List articles
- Syncronise
+ Synchronize
Mark as Read
Settings
diff --git a/src/fr/gaulupeau/apps/Poche/Poche.java b/src/fr/gaulupeau/apps/Poche/Poche.java
index bd0444c..18e0468 100644
--- a/src/fr/gaulupeau/apps/Poche/Poche.java
+++ b/src/fr/gaulupeau/apps/Poche/Poche.java
@@ -31,6 +31,7 @@ import android.os.Build;
import android.os.Bundle;
import android.provider.Browser;
import android.text.Html;
+import android.text.InputFilter.LengthFilter;
import android.util.Base64;
import android.util.Log;
import android.view.Menu;
@@ -54,7 +55,6 @@ import static fr.gaulupeau.apps.Poche.Helpers.getInputStreamFromUrl;
* Main activity class
*/
@TargetApi(Build.VERSION_CODES.FROYO) public class Poche extends Activity {
- TextView authorSite;
private SQLiteDatabase database;
Button btnDone;
Button btnGetPost;
@@ -107,7 +107,7 @@ import static fr.gaulupeau.apps.Poche.Helpers.getInputStreamFromUrl;
// app has been launched from menu - show information window
setContentView(R.layout.main);
// handle done/close button
-
+
btnSync = (Button)findViewById(R.id.btnSync);
btnSync.setOnClickListener(new OnClickListener() {
@@ -152,7 +152,12 @@ import static fr.gaulupeau.apps.Poche.Helpers.getInputStreamFromUrl;
}
});
+ ArticlesSQLiteOpenHelper helper = new ArticlesSQLiteOpenHelper(getApplicationContext());
+ database = helper.getReadableDatabase();
+ int news = database.query(ARTICLE_TABLE, null, ARCHIVE + "=0", null, null, null, null).getCount();
+
btnGetPost = (Button)findViewById(R.id.btnGetPost);
+ btnGetPost.append(" - " + news + " unread");
btnGetPost.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
@@ -162,6 +167,14 @@ import static fr.gaulupeau.apps.Poche.Helpers.getInputStreamFromUrl;
}
}
+
+@Override
+protected void onResume() {
+ super.onResume();
+ ArticlesSQLiteOpenHelper helper = new ArticlesSQLiteOpenHelper(getApplicationContext());
+ database = helper.getReadableDatabase();
+ int news = database.query(ARTICLE_TABLE, null, ARCHIVE + "=0", null, null, null, null).getCount();
+}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
diff --git a/src/fr/gaulupeau/apps/Poche/Settings.java b/src/fr/gaulupeau/apps/Poche/Settings.java
index 837de57..6f5140c 100644
--- a/src/fr/gaulupeau/apps/Poche/Settings.java
+++ b/src/fr/gaulupeau/apps/Poche/Settings.java
@@ -9,6 +9,7 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
+import android.widget.TextView;
public class Settings extends Activity {
Button btnDone;