use of com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.SwipeDismissAdapter 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);
}
}
Aggregations