diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/Poche.java b/app/src/main/java/fr/gaulupeau/apps/Poche/Poche.java
index f92e307..62d716a 100644
--- a/app/src/main/java/fr/gaulupeau/apps/Poche/Poche.java
+++ b/app/src/main/java/fr/gaulupeau/apps/Poche/Poche.java
@@ -84,6 +84,7 @@ import static fr.gaulupeau.apps.Poche.ArticlesSQLiteOpenHelper.ARTICLE_DATE;
Button btnDone;
Button btnGetPost;
Button btnSync;
+ Button btnSettings;
EditText editPocheUrl;
SharedPreferences settings;
static String apiUsername;
@@ -91,9 +92,8 @@ import static fr.gaulupeau.apps.Poche.ArticlesSQLiteOpenHelper.ARTICLE_DATE;
static String pocheUrl;
String action;
-
-
-
+
+
/** Called when the activity is first created.
@@ -195,7 +195,14 @@ import static fr.gaulupeau.apps.Poche.ArticlesSQLiteOpenHelper.ARTICLE_DATE;
startActivity(new Intent(getBaseContext(), ListArticles.class));
}
});
-
+
+ btnSettings = (Button)findViewById(R.id.btnSettings);
+ btnSettings.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ startActivity(new Intent(getBaseContext(), Settings.class));
+ }
+ });
}
}
@@ -236,23 +243,6 @@ import static fr.gaulupeau.apps.Poche.ArticlesSQLiteOpenHelper.ARTICLE_DATE;
}
}
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- MenuInflater inflater = getMenuInflater();
- inflater.inflate(R.menu.option, menu);
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.menuSettings:
- startActivity(new Intent(getBaseContext(), Settings.class));
- default:
- return super.onOptionsItemSelected(item);
- }
- }
-
@Override
protected void onDestroy() {
super.onDestroy();
@@ -268,7 +258,7 @@ import static fr.gaulupeau.apps.Poche.ArticlesSQLiteOpenHelper.ARTICLE_DATE;
ArticlesSQLiteOpenHelper helper = new ArticlesSQLiteOpenHelper(getApplicationContext());
database = helper.getReadableDatabase();
int news = database.query(ARTICLE_TABLE, null, ARCHIVE + "=0", null, null, null, null).getCount();
- btnGetPost.setText(getString(R.string.btnGetPost) + " - " + news + " unread");
+ btnGetPost.setText(String.format(getString(R.string.btnGetPost), news));
}
});
}
diff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml
index d121274..d42d94a 100644
--- a/app/src/main/res/layout/main.xml
+++ b/app/src/main/res/layout/main.xml
@@ -30,7 +30,8 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:text="@string/hello"
- android:textSize="25sp" />
+ android:textSize="25sp"
+ android:visibility="gone" />
+
+
-
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7d4fd68..5fb7385 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -4,16 +4,16 @@
wallabag
Bag it!
GAULUPEAU Jonathan - 2013
- To save a web page to wallabag, open the page in a browser then tap Share and tap on Bag it!. \nYou could then see your wallabag login page. \nAnd it\'s done ! \nMore infos about wallabag at http://www.wallabag.org
+ To save a web page to wallabag, open the page in a browser then tap Share and tap on Bag it!. \nYou could then see your wallabag login page. \nAnd it\'s done ! \nMore infos about wallabag at:\n http://www.wallabag.org
Save
Which browser would you like to use?
http://cv.gaulupeau.fr
Your wallabag URL :
Examples:\nhttp://wallabag.example.fr\nhttp://www.example.fr/wallabag
- List articles
+ List articles - %1$d unread
Synchronize
Mark as Read
- Settings
+ Settings
Show All
Wipe Database
Synchronize done !