Skip to content

Commit

Permalink
Merge pull request #4154 from Akylas/TC-2127
Browse files Browse the repository at this point in the history
[TIMOB-13536] Android: Size animation broken
  • Loading branch information
ayeung committed Jun 6, 2013
2 parents 9e3c548 + 4aac558 commit 9eed840
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,19 @@ public AnimationSet render(TiViewProxy viewProxy, View view, int x, int y, int w
if (height != null) {
optionHeight = new TiDimension(height, TiDimension.TYPE_HEIGHT);
} else {
optionHeight = new TiDimension(w, TiDimension.TYPE_HEIGHT);
optionHeight = new TiDimension(h, TiDimension.TYPE_HEIGHT);
optionHeight.setUnits(TypedValue.COMPLEX_UNIT_PX);
}

ViewParent parent = view.getParent();
View parentView = null;

if (parent instanceof View) {
parentView = (View) parent;
}

int toWidth = optionWidth.getAsPixels(view);
int toHeight = optionHeight.getAsPixels(view);
int toWidth = optionWidth.getAsPixels((parentView != null)?parentView:view);
int toHeight = optionHeight.getAsPixels((parentView != null)?parentView:view);

SizeAnimation sizeAnimation = new SizeAnimation(view, w, h, toWidth, toHeight);

Expand Down

0 comments on commit 9eed840

Please sign in to comment.