menu updates, bump version, misc cleanup

This commit is contained in:
Andrew Dolgov 2011-12-06 14:46:15 +03:00
parent 19cb77aa35
commit 581f79b3c1
10 changed files with 25 additions and 43 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss" package="org.fox.ttrss"
android:versionCode="32" android:versionCode="33"
android:versionName="0.2.0"> android:versionName="0.3.0">
<uses-sdk android:minSdkVersion="4" /> <uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />

View File

@ -2,14 +2,14 @@
<group android:id="@+id/menu_group_logged_in" > <group android:id="@+id/menu_group_logged_in" >
<item
android:id="@+id/go_offline"
android:icon="@drawable/ic_menu_cloud"
android:showAsAction="ifRoom|withText"
android:title="@string/go_offline"/>
<group android:id="@+id/menu_group_feeds" > <group android:id="@+id/menu_group_feeds" >
<item
android:id="@+id/go_offline"
android:icon="@drawable/ic_menu_cloud"
android:showAsAction="ifRoom|withText"
android:title="@string/go_offline"/>
<item <item
android:id="@+id/back_to_categories" android:id="@+id/back_to_categories"
android:icon="@android:drawable/ic_menu_close_clear_cancel" android:icon="@android:drawable/ic_menu_close_clear_cancel"
@ -36,6 +36,12 @@
</group> </group>
<group android:id="@+id/menu_group_headlines" > <group android:id="@+id/menu_group_headlines" >
<item
android:id="@+id/go_offline"
android:icon="@drawable/ic_menu_cloud"
android:showAsAction="ifRoom|withText"
android:title="@string/go_offline"/>
<item <item
android:id="@+id/headlines_mark_as_read" android:id="@+id/headlines_mark_as_read"

View File

@ -30,6 +30,13 @@
<group android:id="@+id/menu_group_headlines" > <group android:id="@+id/menu_group_headlines" >
<item
android:id="@+id/go_online"
android:icon="@drawable/ic_menu_cloud"
android:showAsAction="ifRoom|withText"
android:title="@string/go_online"
android:visible="false"/>
<item <item
android:id="@+id/headlines_mark_as_read" android:id="@+id/headlines_mark_as_read"
android:icon="@drawable/ic_menu_tick" android:icon="@drawable/ic_menu_tick"

View File

@ -7,7 +7,6 @@ import org.fox.ttrss.ArticleOps.RelativeArticle;
import android.app.Activity; import android.app.Activity;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;

View File

@ -7,6 +7,7 @@ import android.provider.BaseColumns;
public class DatabaseHelper extends SQLiteOpenHelper { public class DatabaseHelper extends SQLiteOpenHelper {
@SuppressWarnings("unused")
private final String TAG = this.getClass().getSimpleName(); private final String TAG = this.getClass().getSimpleName();
public static final String DATABASE_NAME = "OfflineStorage.db"; public static final String DATABASE_NAME = "OfflineStorage.db";
public static final int DATABASE_VERSION = 2; public static final int DATABASE_VERSION = 2;

View File

@ -14,11 +14,9 @@ import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.ContextMenu; import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo; import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.AdapterView; import android.widget.AdapterView;

View File

@ -39,11 +39,10 @@ import android.preference.PreferenceManager;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.util.Log; import android.util.Log;
import android.view.ContextMenu; import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.ContextMenu.ContextMenuInfo;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.AdapterView.AdapterContextMenuInfo; import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;

View File

@ -1,9 +1,6 @@
package org.fox.ttrss; package org.fox.ttrss;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.net.MalformedURLException;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
@ -12,9 +9,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.TimeZone; import java.util.TimeZone;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import android.app.Activity; import android.app.Activity;
@ -22,13 +16,11 @@ import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.text.Html; import android.text.Html;
import android.text.Html.ImageGetter; import android.text.Html.ImageGetter;
import android.text.Spanned;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.util.Log; import android.util.Log;
import android.view.ContextMenu; import android.view.ContextMenu;

View File

@ -1,25 +1,15 @@
package org.fox.ttrss; package org.fox.ttrss;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import org.fox.ttrss.ArticleOps.RelativeArticle; import org.fox.ttrss.ArticleOps.RelativeArticle;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.database.Cursor; import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement; import android.database.sqlite.SQLiteStatement;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.provider.BaseColumns; import android.provider.BaseColumns;
@ -37,12 +27,6 @@ import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import com.google.ads.c;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.reflect.TypeToken;
public class OfflineActivity extends FragmentActivity { public class OfflineActivity extends FragmentActivity {
private final String TAG = this.getClass().getSimpleName(); private final String TAG = this.getClass().getSimpleName();
@ -110,9 +94,6 @@ public class OfflineActivity extends FragmentActivity {
new TransitionHelper((LinearLayout)findViewById(R.id.main)); new TransitionHelper((LinearLayout)findViewById(R.id.main));
} }
List<PackageInfo> pkgs = getPackageManager().getInstalledPackages(0);
initMainMenu(); initMainMenu();
findViewById(R.id.loading_container).setVisibility(View.INVISIBLE); findViewById(R.id.loading_container).setVisibility(View.INVISIBLE);
@ -529,7 +510,8 @@ public class OfflineActivity extends FragmentActivity {
findViewById(R.id.article_fragment).setVisibility(View.GONE); findViewById(R.id.article_fragment).setVisibility(View.GONE);
findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE);
} else { } else {
findViewById(R.id.article_fragment).setVisibility(View.GONE); findViewById(R.id.article_fragment).setVisibility(View.GONE);
findViewById(R.id.feeds_fragment).setVisibility(View.VISIBLE);
} }

View File

@ -2,9 +2,7 @@ package org.fox.ttrss;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.TimeZone; import java.util.TimeZone;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;