Search in sources :

Example 11 with SwingBottomInAnimationAdapter

use of com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter in project cardslib by gabrielemariotti.

the class ListViewAnimationsFragment method setBottomRightAdapter.

/**
     * Bottom-right animation
     */
private void setBottomRightAdapter() {
    AnimationAdapter animCardArrayAdapter = new SwingBottomInAnimationAdapter(new SwingRightInAnimationAdapter(mCardArrayAdapter));
    animCardArrayAdapter.setAbsListView(mListView);
    if (mListView != null) {
        mListView.setExternalAdapter(animCardArrayAdapter, mCardArrayAdapter);
    }
}
Also used : SwingRightInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.SwingRightInAnimationAdapter) SwingBottomInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter) SwingLeftInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.SwingLeftInAnimationAdapter) ScaleInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.ScaleInAnimationAdapter) SwingRightInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.SwingRightInAnimationAdapter) AlphaInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.AlphaInAnimationAdapter) AnimationAdapter(com.nhaarman.listviewanimations.appearance.AnimationAdapter) SwingBottomInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter)

Example 12 with SwingBottomInAnimationAdapter

use of com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter in project ListViewAnimations by nhaarman.

the class AppearanceExamplesActivity method setBottomAdapter.

private void setBottomAdapter() {
    if (!(mAnimAdapter instanceof SwingBottomInAnimationAdapter)) {
        mAnimAdapter = new SwingBottomInAnimationAdapter(mAdapter);
        mAnimAdapter.setAbsListView(getListView());
        getListView().setAdapter(mAnimAdapter);
    }
}
Also used : SwingBottomInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter)

Example 13 with SwingBottomInAnimationAdapter

use of com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter in project ListViewAnimations by nhaarman.

the class GoogleCardsActivity method onCreate.

@Override
protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_googlecards);
    ListView listView = (ListView) findViewById(R.id.activity_googlecards_listview);
    mGoogleCardsAdapter = new GoogleCardsAdapter(this);
    SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(new SwipeDismissAdapter(mGoogleCardsAdapter, this));
    swingBottomInAnimationAdapter.setAbsListView(listView);
    assert swingBottomInAnimationAdapter.getViewAnimator() != null;
    swingBottomInAnimationAdapter.getViewAnimator().setInitialDelayMillis(INITIAL_DELAY_MILLIS);
    listView.setAdapter(swingBottomInAnimationAdapter);
    for (int i = 0; i < 100; i++) {
        mGoogleCardsAdapter.add(i);
    }
}
Also used : ListView(android.widget.ListView) SwipeDismissAdapter(com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.SwipeDismissAdapter) SwingBottomInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter)

Example 14 with SwingBottomInAnimationAdapter

use of com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter in project ListViewAnimations by nhaarman.

the class GridViewActivity method onCreate.

@Override
protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_gridview);
    GridView gridView = (GridView) findViewById(R.id.activity_gridview_gv);
    SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(new GridViewAdapter(this));
    swingBottomInAnimationAdapter.setAbsListView(gridView);
    assert swingBottomInAnimationAdapter.getViewAnimator() != null;
    swingBottomInAnimationAdapter.getViewAnimator().setInitialDelayMillis(INITIAL_DELAY_MILLIS);
    gridView.setAdapter(swingBottomInAnimationAdapter);
    assert getActionBar() != null;
    getActionBar().setDisplayHomeAsUpEnabled(true);
}
Also used : GridView(android.widget.GridView) SwingBottomInAnimationAdapter(com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter)

Aggregations

SwingBottomInAnimationAdapter (com.nhaarman.listviewanimations.appearance.simple.SwingBottomInAnimationAdapter)14 SwingRightInAnimationAdapter (com.nhaarman.listviewanimations.appearance.simple.SwingRightInAnimationAdapter)11 AnimationAdapter (com.nhaarman.listviewanimations.appearance.AnimationAdapter)10 AlphaInAnimationAdapter (com.nhaarman.listviewanimations.appearance.simple.AlphaInAnimationAdapter)10 ScaleInAnimationAdapter (com.nhaarman.listviewanimations.appearance.simple.ScaleInAnimationAdapter)10 SwingLeftInAnimationAdapter (com.nhaarman.listviewanimations.appearance.simple.SwingLeftInAnimationAdapter)10 GridView (android.widget.GridView)1 ListView (android.widget.ListView)1 SwipeDismissAdapter (com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.SwipeDismissAdapter)1