Cosmectic changes

This commit is contained in:
GAULUPEAU Jonathan 2013-11-14 08:53:01 +01:00
parent cb24e39691
commit de64e6320e
5 changed files with 30 additions and 14 deletions

View File

@ -50,13 +50,7 @@
android:layout_weight="1"
android:text="@string/btnSync" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:text="@string/author"
android:textSize="10sp" />
</LinearLayout>

View File

@ -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" />
<Button
android:id="@+id/btnDone"
@ -58,6 +57,15 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/btnDone" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:text="@string/author"
android:textSize="10sp" />
</LinearLayout>
</LinearLayout>

View File

@ -3,7 +3,7 @@
<string name="hello">In the poche !</string>
<string name="app_name">In the poche</string>
<string name="label_name">Add in the poche</string>
<string name="author">By GAULUPEAU Jonathan</string>
<string name="author">GAULUPEAU Jonathan - 2013</string>
<string name="instructions">To save a web page to poche, open the page in a browser then tap <i>Share</i> and tap on <i>In the poche</i>. \nYou could then see your Poche login page. \nAnd it\'s done ! \nMore infos about poche at http://www.inthepoche.com</string>
<string name="btnDone">Save</string>
<string name="which_browser">Which browser would you like to use?</string>
@ -11,7 +11,7 @@
<string name="url_label"><b><u>Your poche URL :</u></b></string>
<string name="url_help">Examples:\n<i>http://poche.example.fr</i>\n<i>http://www.example.fr/poche</i></string>
<string name="btnGetPost">List articles</string>
<string name="btnSync">Syncronise</string>
<string name="btnSync">Synchronize</string>
<string name="btnMarkRead">Mark as Read</string>
<string name="menuSettings">Settings</string>
</resources>

View File

@ -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;
@ -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) {
@ -163,6 +168,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) {
MenuInflater inflater = getMenuInflater();

View File

@ -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;