Search in sources :

Example 1 with CardWrapper

use of org.liberty.android.fantastischmemo.ui.CardListActivity.CardWrapper in project AnyMemo by helloworld1.

the class CardWrapperListLoader method dbLoadInBackground.

@Override
protected List<CardWrapper> dbLoadInBackground() {
    CardDao cardDao = dbOpenHelper.getCardDao();
    List<CardWrapper> cardWrappers = new ArrayList<CardWrapper>((int) cardDao.countOf());
    for (Card card : cardDao.getAllCards(null)) {
        cardWrappers.add(new CardWrapper(card, initialAnswerVisible));
    }
    return cardWrappers;
}
Also used : ArrayList(java.util.ArrayList) CardWrapper(org.liberty.android.fantastischmemo.ui.CardListActivity.CardWrapper) CardDao(org.liberty.android.fantastischmemo.dao.CardDao) Card(org.liberty.android.fantastischmemo.entity.Card)

Aggregations

ArrayList (java.util.ArrayList)1 CardDao (org.liberty.android.fantastischmemo.dao.CardDao)1 Card (org.liberty.android.fantastischmemo.entity.Card)1 CardWrapper (org.liberty.android.fantastischmemo.ui.CardListActivity.CardWrapper)1