private void tabCreatedInForeground(int id,int sourceId,boolean newIsIncognito,float originX,float originY){
  LayoutTab newLayoutTab=createLayoutTab(id,newIsIncognito,NO_CLOSE_BUTTON,NO_TITLE);
  if (mLayoutTabs == null || mLayoutTabs.length == 0) {
    mLayoutTabs=new LayoutTab[]{newLayoutTab};
  }
 else {
    mLayoutTabs=new LayoutTab[]{mLayoutTabs[0],newLayoutTab};
  }
  updateCacheVisibleIds(new LinkedList<Integer>(Arrays.asList(id,sourceId)));
  newLayoutTab.setBorderAlpha(0.0f);
  newLayoutTab.setStaticToViewBlend(1.f);
  forceAnimationToFinish();
  Interpolator interpolator=BakedBezierInterpolator.TRANSFORM_CURVE;
  addToAnimation(newLayoutTab,LayoutTab.Property.SCALE,0.f,1.f,FOREGROUND_ANIMATION_DURATION,0,false,interpolator);
  addToAnimation(newLayoutTab,LayoutTab.Property.ALPHA,0.f,1.f,FOREGROUND_ANIMATION_DURATION,0,false,interpolator);
  addToAnimation(newLayoutTab,LayoutTab.Property.X,originX,0.f,FOREGROUND_ANIMATION_DURATION,0,false,interpolator);
  addToAnimation(newLayoutTab,LayoutTab.Property.Y,originY,0.f,FOREGROUND_ANIMATION_DURATION,0,false,interpolator);
  mTabModelSelector.selectModel(newIsIncognito);
  startHiding(id,false);
}

private void tabCreatedInForeground ( int id , int sourceId , boolean newIsIncognito , float originX , float originY ) { LayoutTab newLayoutTab = createLayoutTab ( id , newIsIncognito , NO_CLOSE_BUTTON , NO_TITLE ) ; if ( mLayoutTabs == null || mLayoutTabs . length == 0 ) { mLayoutTabs = new LayoutTab [ ] { newLayoutTab } ; } else { mLayoutTabs = new LayoutTab [ ] { mLayoutTabs [ 0 ] , newLayoutTab } ; } updateCacheVisibleIds ( new LinkedList < Integer > ( Arrays . asList ( id , sourceId ) ) ) ; newLayoutTab . setBorderAlpha ( 0.0f ) ; newLayoutTab . setStaticToViewBlend ( 1.f ) ; forceAnimationToFinish ( ) ; Interpolator interpolator = BakedBezierInterpolator . TRANSFORM_CURVE ; addToAnimation ( newLayoutTab , LayoutTab . Property . SCALE , 0.f , 1.f , FOREGROUND_ANIMATION_DURATION , 0 , false , interpolator ) ; addToAnimation ( newLayoutTab , LayoutTab . Property . ALPHA , 0.f , 1.f , FOREGROUND_ANIMATION_DURATION , 0 , false , interpolator ) ; addToAnimation ( newLayoutTab , LayoutTab . Property . X , originX , 0.f , FOREGROUND_ANIMATION_DURATION , 0 , false , interpolator ) ; addToAnimation ( newLayoutTab , LayoutTab . Property . Y , originY , 0.f , FOREGROUND_ANIMATION_DURATION , 0 , false , interpolator ) ; mTabModelSelector . selectModel ( newIsIncognito ) ; startHiding ( id , false ) ; }
animate opening a tab in the foreground .
