I'm building and Android app that needs to go through steps like a wizard.
Current structure:
At the moment I'm using one activity with separate views.xml for each step, then I'm using setContentView(activeStep)
to display the active step.
I ran into some difficulties when trying to animate between the steps. I used the following code:
LayoutInflater inflater = getLayoutInflater();
View view = inflater.inflate(activeStep, null, false);
view.startAnimation(AnimationUtils.loadAnimation(activity, R.anim.slide_in));
setContentView(view);
The result: the first view was gone and the new one animated, not a smooth transition.
My goal is to animate both views, one slides out the other in.
Question: Is it possible to do it with my current structure (reminder: one activity, many views) or should I treat each step as a separate activity?