move some more common stuff to CommonActivity

This commit is contained in:
Andrew Dolgov 2012-06-24 23:55:56 +04:00
parent 099377a665
commit 3d39b03a60
3 changed files with 5 additions and 22 deletions

View File

@ -11,6 +11,11 @@ import android.util.Log;
public class CommonActivity extends FragmentActivity {
private final String TAG = this.getClass().getSimpleName();
public final static String FRAG_HEADLINES = "headlines";
public final static String FRAG_ARTICLE = "article";
public final static String FRAG_FEEDS = "feeds";
public final static String FRAG_CATS = "cats";
private SQLiteDatabase m_readableDb;
private SQLiteDatabase m_writableDb;

View File

@ -65,11 +65,6 @@ import com.google.gson.reflect.TypeToken;
public class MainActivity extends CommonActivity implements OnlineServices {
private final String TAG = this.getClass().getSimpleName();
protected final static String FRAG_HEADLINES = "headlines";
protected final static String FRAG_ARTICLE = "article";
protected final static String FRAG_FEEDS = "feeds";
protected final static String FRAG_CATS = "cats";
private SharedPreferences m_prefs;
private String m_themeName = "";
private String m_sessionId;
@ -1759,10 +1754,6 @@ public class MainActivity extends CommonActivity implements OnlineServices {
viewFeed(feed, false);
}
public Article getSelectedArticle() {
return m_selectedArticle;
}
public void viewFeed(Feed feed, boolean append) {
Log.d(TAG, "viewFeeed/" + feed.id);

View File

@ -46,11 +46,6 @@ public class OfflineActivity extends CommonActivity implements
OfflineServices {
private final String TAG = this.getClass().getSimpleName();
protected final static String FRAG_HEADLINES = "headlines";
protected final static String FRAG_ARTICLE = "article";
protected final static String FRAG_FEEDS = "feeds";
protected final static String FRAG_CATS = "cats";
private SharedPreferences m_prefs;
private String m_themeName = "";
private Menu m_menu;
@ -429,14 +424,6 @@ public class OfflineActivity extends CommonActivity implements
return true;
}
private void setMenuLabel(int id, int labelId) {
MenuItem mi = m_menu.findItem(id);
if (mi != null) {
mi.setTitle(labelId);
}
}
private void goBack(boolean allowQuit) {
if (isSmallScreen()) {
if (m_selectedArticleId != 0) {