Exemplo n.º 1
0
  /**
   * You can use this method, if you are using external adapters. Pay attention. The generic
   * adapter#getView() method has to call the cardCursorAdapter#getView() method to work.
   *
   * @param adapter {@link ListAdapter} generic adapter
   * @param cardCursorAdapter {@link it.gmariotti.cardslib.library.internal.CardCursorAdapter}
   *     cardArrayAdapter
   */
  public void setExternalAdapter(ListAdapter adapter, CardGridCursorAdapter cardCursorAdapter) {

    setAdapter(adapter);

    mCursorAdapter = cardCursorAdapter;
    mCursorAdapter.setCardGridView(this);
    mCursorAdapter.setRowLayoutId(list_card_layout_resourceID);
  }
Exemplo n.º 2
0
  /**
   * Set {@link it.gmariotti.cardslib.library.internal.CardGridCursorAdapter} and layout used by
   * items in ListView
   *
   * @param adapter {@link it.gmariotti.cardslib.library.internal.CardGridCursorAdapter}
   */
  public void setAdapter(CardGridCursorAdapter adapter) {
    super.setAdapter(adapter);

    // Set Layout used by items
    adapter.setRowLayoutId(list_card_layout_resourceID);

    adapter.setCardGridView(this);
    mCursorAdapter = adapter;
  }