protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.view_deck_activity);

    Bundle bundle = getIntent().getExtras();
    deckTitle = bundle.getString(DECK_TITLE);

    deck = backend.load(deckTitle);
    cards = deck.getCards();

    listView = this.getListView();

    listView.setAdapter(new ArrayAdapter<Cards>(this, R.layout.card, cards));

    TextView addCard = (TextView) findViewById(R.id.add_card);
    addCard.setOnClickListener(
        new OnClickListener() {
          public void onClick(View view) {
            addCard();
          }
        });
    registerForContextMenu(listView);
  }
 protected void onResume() {
   super.onResume();
   deck = backend.load(deckTitle);
   cards = deck.getCards();
   listView.setAdapter(new ArrayAdapter<Cards>(this, R.layout.card, cards));
 }