I have a linearlayout that contains 4 nested linear layouts. I need to hide the first nested layout and show the 2 and 3 and then hide the 2 and 3 and show the 1st. I would like to animate these transistions with sliding effects. So have the 1st slide of the screen and then the 2 and 3 slide on. I have managed to animate 1 sliding off ( although not very smoothly ) but can't figure out how to do the slide on to go from View.GONE to View.VISIBLE.
Without the animation is I just do setVisiblity on the 1st to hide it and then setVisiblity on the 2/3 to shot them then it is very glitchy and the text overlaps.
See below for the problem I am encountering.
The code that I am using to hide / show currently:
LinearLayout item2= (LinearLayout) rootView.findViewById(R.id.item2);
LinearLayout item1= (LinearLayout) rootView.findViewById(R.id.item2);
item1.setVisibility(View.GONE);
item2.setVisibility(View.VISIBLE);