use of com.melnykov.fab.FloatingActionButton in project cardslib by gabrielemariotti.
the class NativeFabFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
hideList(false);
// Set the arrayAdapter
ArrayList<Card> cards = new ArrayList<Card>();
mCardArrayAdapter = new CardArrayAdapter(getActivity(), cards);
CardListView listView = (CardListView) getActivity().findViewById(R.id.carddemo_list_base1);
if (listView != null) {
listView.setAdapter(mCardArrayAdapter);
}
FloatingActionButton floatingActionButton = (FloatingActionButton) getActivity().findViewById(R.id.button_floating_action);
floatingActionButton.attachToListView(listView);
// Load cards
new LoaderAsyncTask().execute();
}
Aggregations