use of it.gmariotti.cardslib.library.recyclerview.internal.CardArrayRecyclerViewAdapter in project cardslib by gabrielemariotti.
the class RecyclerViewFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
hideList(false);
//Set the arrayAdapter
ArrayList<Card> cards = new ArrayList<Card>();
mCardArrayAdapter = new CardArrayRecyclerViewAdapter(getActivity(), cards);
//Staggered grid view
CardRecyclerView mRecyclerView = (CardRecyclerView) getActivity().findViewById(R.id.carddemo_recyclerview);
mRecyclerView.setHasFixedSize(false);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
//Set the empty view
if (mRecyclerView != null) {
mRecyclerView.setAdapter(mCardArrayAdapter);
}
//Load cards
new LoaderAsyncTask().execute();
}
Aggregations