use of it.gmariotti.cardslib.library.extra.twoway.view.CardTwowayView in project cardslib by gabrielemariotti.
the class List2wayFragment 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
CardTwowayView mRecyclerView = (CardTwowayView) getActivity().findViewById(R.id.carddemo_extras_list_2wayview);
mRecyclerView.setHasFixedSize(false);
mRecyclerView.addItemDecoration(new SpacingItemDecoration(8, 8));
//Set the empty view
if (mRecyclerView != null) {
mRecyclerView.setAdapter(mCardArrayAdapter);
}
//Load cards
new LoaderAsyncTask().execute();
}
use of it.gmariotti.cardslib.library.extra.twoway.view.CardTwowayView in project cardslib by gabrielemariotti.
the class StaggeredGrid2wayFragment 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
CardTwowayView mRecyclerView = (CardTwowayView) getActivity().findViewById(R.id.carddemo_extras_grid_stag_2wayview);
mRecyclerView.setHasFixedSize(false);
mRecyclerView.addItemDecoration(new SpacingItemDecoration(8, 8));
//Set the empty view
if (mRecyclerView != null) {
mRecyclerView.setAdapter(mCardArrayAdapter);
}
//Load cards
new LoaderAsyncTask().execute();
}
Aggregations