Java Code Examples for com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter

The following examples show how to use com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
protected void onCreate(final Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setTitle("Google Card");
	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.setInitialDelayMillis(300);
	swingBottomInAnimationAdapter.setAbsListView(listView);

	listView.setAdapter(swingBottomInAnimationAdapter);

	mGoogleCardsAdapter.addAll(getItems());
}
 
Example 2
@SuppressLint("InlinedApi")
@Override
protected void onCreate(final Bundle savedInstanceState) {
	if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
		getWindow()
				.addFlags(
						android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
	}
	super.onCreate(savedInstanceState);
	setTitle("Gridview动画");
	setContentView(R.layout.activity_gridview);

	GridView gridView = (GridView) findViewById(R.id.activity_gridview_gv);
	SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(
			new MyAdapter(this, getItems()));
	swingBottomInAnimationAdapter.setAbsListView(gridView);
	swingBottomInAnimationAdapter.setInitialDelayMillis(300);
	gridView.setAdapter(swingBottomInAnimationAdapter);

}
 
Example 3
private void setBottomAdapter() {
	AnimationAdapter animAdapter = new SwingBottomInAnimationAdapter(
			mAdapter);
	animAdapter.setAbsListView(getListView());
	getListView().setAdapter(animAdapter);
}
 
Example 4
private void setBottomRightAdapter() {
	AnimationAdapter animAdapter = new SwingBottomInAnimationAdapter(
			new SwingRightInAnimationAdapter(mAdapter));
	animAdapter.setAbsListView(getListView());
	getListView().setAdapter(animAdapter);
}