move some more common stuff to CommonActivity
This commit is contained in:
parent
099377a665
commit
3d39b03a60
@ -11,6 +11,11 @@ import android.util.Log;
|
|||||||
public class CommonActivity extends FragmentActivity {
|
public class CommonActivity extends FragmentActivity {
|
||||||
private final String TAG = this.getClass().getSimpleName();
|
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_readableDb;
|
||||||
private SQLiteDatabase m_writableDb;
|
private SQLiteDatabase m_writableDb;
|
||||||
|
|
||||||
|
@ -64,11 +64,6 @@ import com.google.gson.reflect.TypeToken;
|
|||||||
|
|
||||||
public class MainActivity extends CommonActivity implements OnlineServices {
|
public class MainActivity extends CommonActivity implements OnlineServices {
|
||||||
private final String TAG = this.getClass().getSimpleName();
|
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 SharedPreferences m_prefs;
|
||||||
private String m_themeName = "";
|
private String m_themeName = "";
|
||||||
@ -1759,10 +1754,6 @@ public class MainActivity extends CommonActivity implements OnlineServices {
|
|||||||
viewFeed(feed, false);
|
viewFeed(feed, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Article getSelectedArticle() {
|
|
||||||
return m_selectedArticle;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void viewFeed(Feed feed, boolean append) {
|
public void viewFeed(Feed feed, boolean append) {
|
||||||
Log.d(TAG, "viewFeeed/" + feed.id);
|
Log.d(TAG, "viewFeeed/" + feed.id);
|
||||||
|
|
||||||
|
@ -46,11 +46,6 @@ public class OfflineActivity extends CommonActivity implements
|
|||||||
OfflineServices {
|
OfflineServices {
|
||||||
private final String TAG = this.getClass().getSimpleName();
|
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 SharedPreferences m_prefs;
|
||||||
private String m_themeName = "";
|
private String m_themeName = "";
|
||||||
private Menu m_menu;
|
private Menu m_menu;
|
||||||
@ -429,14 +424,6 @@ public class OfflineActivity extends CommonActivity implements
|
|||||||
return true;
|
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) {
|
private void goBack(boolean allowQuit) {
|
||||||
if (isSmallScreen()) {
|
if (isSmallScreen()) {
|
||||||
if (m_selectedArticleId != 0) {
|
if (m_selectedArticleId != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user