hi I've found a source code for android.
In this code, you can see following line :
..... private View root; // root of the layout for this activity private View edit; // root view for the editing layout .....
@Override public void onCreate(Bundle state) { super.onCreate(state);
...
root = findViewById(R.id.list_container);
edit = findViewById(R.id.edit_layout);
...
}
private void animateToEditView() { assert(!isEditing); isEditing = true;
// Cancel any toast that may currently be displayed.
if (null != toast)
toast.cancel();
View list = getListView();
int cx = root.getWidth() / 2;
int cy = root.getHeight() / 2;
Animation animation = new Flip3dAnimation(list, edit, cx, cy, true);
animation.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationEnd(Animation animation) {
if (0 == secretsList.getCount()) {
showToast(getText(R.string.edit_instructions));
}
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationStart(Animation animation) {
}
});
root.startAnimation(animation);
}
In above code :
root.startAnimation(animation);
Can this code call another view from current view ?
If so, Do I need to initialize screen (to transit to) in onCreate method ?