use of com.transitionseverywhere.Scene in project Transitions-Everywhere by andkulikov.
the class ScenesSample method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_scenes, container, false);
RadioGroup radioGroup = (RadioGroup) view.findViewById(R.id.select_scene);
radioGroup.setOnCheckedChangeListener(this);
mSceneRoot = (ViewGroup) view.findViewById(R.id.scene_root);
// A Scene can be instantiated from a live view hierarchy.
mScene1 = new Scene(mSceneRoot, mSceneRoot.findViewById(R.id.container));
// You can also inflate a generate a Scene from a layout resource file.
mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.scene2, getContext());
// Another scene from a layout resource file.
mScene3 = Scene.getSceneForLayout(mSceneRoot, R.layout.scene3, getContext());
// We create a custom TransitionManager for Scene 3, in which ChangeBounds, Fade and
// ChangeImageTransform take place at the same time.
mTransitionManagerForScene3 = TransitionInflater.from(getContext()).inflateTransitionManager(R.anim.scene3_transition_manager, mSceneRoot);
return view;
}
Aggregations