Search in sources :

Example 6 with FloatingActionButton

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();
}
Also used : CardListView(it.gmariotti.cardslib.library.view.CardListView) ArrayList(java.util.ArrayList) FloatingActionButton(com.melnykov.fab.FloatingActionButton) CardArrayAdapter(it.gmariotti.cardslib.library.internal.CardArrayAdapter) BaseCard(it.gmariotti.cardslib.library.internal.base.BaseCard) Card(it.gmariotti.cardslib.library.internal.Card)

Aggregations

FloatingActionButton (com.melnykov.fab.FloatingActionButton)6 View (android.view.View)4 ColorDrawable (android.graphics.drawable.ColorDrawable)2 ViewPager (android.support.v4.view.ViewPager)2 Activity (android.app.Activity)1 Intent (android.content.Intent)1 CoordinatorLayout (android.support.design.widget.CoordinatorLayout)1 Toolbar (android.support.v7.widget.Toolbar)1 OnClickListener (android.view.View.OnClickListener)1 ViewGroup (android.view.ViewGroup)1 ExpandableListView (android.widget.ExpandableListView)1 ImageButton (android.widget.ImageButton)1 ListView (android.widget.ListView)1 TextView (android.widget.TextView)1 AccountItem (com.xabber.android.data.account.AccountItem)1 StatusMode (com.xabber.android.data.account.StatusMode)1 AccountJid (com.xabber.android.data.entity.AccountJid)1 AccountPainter (com.xabber.android.ui.color.AccountPainter)1 CircleImageView (de.hdodenhof.circleimageview.CircleImageView)1 Card (it.gmariotti.cardslib.library.internal.Card)1