Search in sources :

Example 31 with DBQuery

use of com.newsrob.DBQuery in project newsrob by marianokamp.

the class AbstractNewsRobListActivity method shouldMarkAllReadButtonBeEnabled.

protected boolean shouldMarkAllReadButtonBeEnabled() {
    DBQuery dbq = new DBQuery(getDbQuery());
    dbq.setShouldHideReadItemsWithoutUpdatingThePreference(true);
    return getEntryManager().isMarkAllReadPossible(dbq);
}
Also used : DBQuery(com.newsrob.DBQuery)

Example 32 with DBQuery

use of com.newsrob.DBQuery in project newsrob by marianokamp.

the class UnreadWidgetPrefActivity method doCreateWidget.

private void doCreateWidget(WidgetPreferences widgetPrefs, EntryManager entryManager, String filterLabel, Long filterFeedId) {
    DBQuery dbq = new DBQuery(entryManager, filterLabel, filterFeedId);
    dbq.setShouldHideReadItemsWithoutUpdatingThePreference(true);
    widgetPrefs.setDBQuery(dbq);
    entryManager.saveWidgetPreferences(appWidgetId, widgetPrefs);
    Intent resultValue = new Intent();
    resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
    setResult(RESULT_OK, resultValue);
    finish();
    PL.log("doCreateWidget, about to call updateAppWidget", entryManager.getContext());
    RemoteViews remoteViews = UnreadWidgetProvider.buildUpdate(this, appWidgetId);
    AppWidgetManager widgetManager = AppWidgetManager.getInstance(this);
    widgetManager.updateAppWidget(appWidgetId, remoteViews);
}
Also used : RemoteViews(android.widget.RemoteViews) AppWidgetManager(android.appwidget.AppWidgetManager) DBQuery(com.newsrob.DBQuery) Intent(android.content.Intent)

Aggregations

DBQuery (com.newsrob.DBQuery)32 Feed (com.newsrob.Feed)7 Intent (android.content.Intent)3 Entry (com.newsrob.Entry)2 ArrayList (java.util.ArrayList)2 AppWidgetManager (android.appwidget.AppWidgetManager)1 Cursor (android.database.Cursor)1 Bundle (android.os.Bundle)1 TypedValue (android.util.TypedValue)1 View (android.view.View)1 AdapterView (android.widget.AdapterView)1 ImageView (android.widget.ImageView)1 ProgressBar (android.widget.ProgressBar)1 RemoteViews (android.widget.RemoteViews)1 TextView (android.widget.TextView)1 Date (java.util.Date)1