-
Notifications
You must be signed in to change notification settings - Fork 385
Migration
Alex Vasilkov edited this page Apr 4, 2017
·
1 revision
-
ViewsTransitionBuilder
is deprecated, recommended replacement isGestureTransitions
:
// Animating from single image into full image mode
GestureTransitions.from(imageView).into(gestureImageView);
// From RecyclerView into ViewPager.
GestureTransitions.from(recyclerView, fromTracker).into(pagerView, intoTracker);
-
SimpleViewsTracker
is deprecated, recommended replacement isSimpleTracker
:
SimpleTracker pagerTracker = new SimpleTracker() {
@Override
public View getViewAt(int pos) {
...
}
};
-
ViewsTracker
is deprecated, recommended replacement isFromTracker
andIntoTracker
:
FromTracker<String> fromTracker = new FromTracker<String>() {
@Override
public int getPositionById(@NonNull String id) {
// Find and return position for given id.
// Note that several ids may end up in single list position.
return [position];
}
@Override
public View getViewById(@NonNull String id) {
// Find and return view for given id.
return [view];
}
};
IntoTracker<String> intoTracker = new IntoTracker<String>() {
@Override
public String getIdByPosition(int position) {
// Find and return id for given position.
// Note, that only one id per position should be possible for "To" view.
return [id];
}
@Override
public int getPositionById(@NonNull String id) {
// Find and return position for given id.
return [position];
}
@Override
public View getViewById(@NonNull String id) {
// Find and return view for given id.
return [view];
}
};