public void addPageAnimaition(PageAnimation pageAnimation){
  int page=pageAnimation.getPage();
  if (pageAnimations == null)   pageAnimations=new ArrayList<>();
  while (page + 1 > pageAnimations.size()) {
    pageAnimations.add(new ArrayList<PageAnimation>());
  }
  ArrayList<PageAnimation> pageAnimationsInPage=pageAnimations.get(page);
  if (pageAnimationsInPage == null)   pageAnimationsInPage=new ArrayList<>();
  pageAnimationsInPage.add(pageAnimation);
}

public void addPageAnimaition ( PageAnimation pageAnimation ) { int page = pageAnimation . getPage ( ) ; if ( pageAnimations == null ) pageAnimations = new ArrayList < > ( ) ; while ( page + 1 > pageAnimations . size ( ) ) { pageAnimations . add ( new ArrayList < PageAnimation > ( ) ) ; } ArrayList < PageAnimation > pageAnimationsInPage = pageAnimations . get ( page ) ; if ( pageAnimationsInPage == null ) pageAnimationsInPage = new ArrayList < > ( ) ; pageAnimationsInPage . add ( pageAnimation ) ; }
add a pageanimation to the view the pageanimation plays from pageanimation . getpage ( )
