use of com.nhaarman.listviewanimations.util.StickyListHeadersListViewWrapper in project ListViewAnimations by nhaarman.
the class StickyListHeadersActivity method onCreate.
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_stickylistheaders);
StickyListHeadersListView listView = (StickyListHeadersListView) findViewById(R.id.activity_stickylistheaders_listview);
listView.setFitsSystemWindows(true);
MyListAdapter adapter = new MyListAdapter(this);
AlphaInAnimationAdapter animationAdapter = new AlphaInAnimationAdapter(adapter);
StickyListHeadersAdapterDecorator stickyListHeadersAdapterDecorator = new StickyListHeadersAdapterDecorator(animationAdapter);
stickyListHeadersAdapterDecorator.setListViewWrapper(new StickyListHeadersListViewWrapper(listView));
assert animationAdapter.getViewAnimator() != null;
animationAdapter.getViewAnimator().setInitialDelayMillis(500);
assert stickyListHeadersAdapterDecorator.getViewAnimator() != null;
stickyListHeadersAdapterDecorator.getViewAnimator().setInitialDelayMillis(500);
listView.setAdapter(stickyListHeadersAdapterDecorator);
}
use of com.nhaarman.listviewanimations.util.StickyListHeadersListViewWrapper in project ListViewAnimations by nhaarman.
the class StickyListHeadersAdapterDecorator method setStickyListHeadersListView.
/**
* Sets the {@link se.emilsjolander.stickylistheaders.StickyListHeadersListView} that this adapter will be bound to.
*/
public void setStickyListHeadersListView(@NonNull final StickyListHeadersListView listView) {
ListViewWrapper stickyListHeadersListViewWrapper = new StickyListHeadersListViewWrapper(listView);
setListViewWrapper(stickyListHeadersListViewWrapper);
}
Aggregations