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

The following examples show how to use com.nhaarman.listviewanimations.swinginadapters.prepared.SwingBottomInAnimationAdapter. 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
Source File: GoogleCardsActivity.java    From android-open-project-demo with Apache License 2.0 6 votes vote down vote up
@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
Source File: GridViewActivity.java    From android-open-project-demo with Apache License 2.0 6 votes vote down vote up
@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
Source File: ItemAnimationActivity.java    From android-open-project-demo with Apache License 2.0 4 votes vote down vote up
private void setBottomAdapter() {
	AnimationAdapter animAdapter = new SwingBottomInAnimationAdapter(
			mAdapter);
	animAdapter.setAbsListView(getListView());
	getListView().setAdapter(animAdapter);
}
 
Example #4
Source File: ItemAnimationActivity.java    From android-open-project-demo with Apache License 2.0 4 votes vote down vote up
private void setBottomRightAdapter() {
	AnimationAdapter animAdapter = new SwingBottomInAnimationAdapter(
			new SwingRightInAnimationAdapter(mAdapter));
	animAdapter.setAbsListView(getListView());
	getListView().setAdapter(animAdapter);
}