Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-15776] (3_2_X) Android: Make sure that the layout properties are updated after the a... #5514

Merged
merged 1 commit into from
Mar 24, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private AnimatorSet buildPropertyAnimators(int x, int y, int w, int h, int paren

// Relayout child in pre-Honeycomb so that touch targets get
// updated.
relayoutChild = PRE_HONEYCOMB && (autoreverse == null || !autoreverse.booleanValue());
relayoutChild = (autoreverse == null || !autoreverse.booleanValue());

} else {

Expand Down Expand Up @@ -502,7 +502,7 @@ private AnimatorSet buildPropertyAnimators(int x, int y, int w, int h, int paren
// orientation. But if autoreversing to original layout, no
// need to re-layout. Also, don't do it if a rotation is included,
// since the re-layout will lose the rotation.
relayoutChild = PRE_HONEYCOMB && !includesRotation && (autoreverse == null || !autoreverse.booleanValue());
relayoutChild = !includesRotation && (autoreverse == null || !autoreverse.booleanValue());

}

Expand Down Expand Up @@ -560,7 +560,7 @@ private AnimatorSet buildPropertyAnimators(int x, int y, int w, int h, int paren
// to original layout, no need to re-layout.
// Also, don't do it if a rotation is included,
// since the re-layout will lose the rotation.
relayoutChild = PRE_HONEYCOMB && !includesRotation && (autoreverse == null || !autoreverse.booleanValue());
relayoutChild = !includesRotation && (autoreverse == null || !autoreverse.booleanValue());
}

AnimatorSet as = new AnimatorSet();
Expand Down Expand Up @@ -1206,17 +1206,19 @@ public void onAnimationCancel(Animator animator)
@SuppressWarnings("unchecked")
public void onAnimationEnd(Animator animator)
{
if (relayoutChild && PRE_HONEYCOMB) {
LayoutParams params = null;
View viewToSetParams = view;
if (view.getParent() instanceof TiBorderWrapperView) {
viewToSetParams = (View) view.getParent();
if (relayoutChild) {
if (PRE_HONEYCOMB) {
LayoutParams params = null;
View viewToSetParams = view;
if (view.getParent() instanceof TiBorderWrapperView) {
viewToSetParams = (View) view.getParent();
}
params = (LayoutParams) viewToSetParams.getLayoutParams();
TiConvert.fillLayout(options, params);
viewToSetParams.setLayoutParams(params);
view.clearAnimation();
relayoutChild = false;
}
params = (LayoutParams) viewToSetParams.getLayoutParams();
TiConvert.fillLayout(options, params);
viewToSetParams.setLayoutParams(params);
view.clearAnimation();
relayoutChild = false;
// TIMOB-11298 Propagate layout property changes to proxy
for (Object key : options.keySet()) {
if (TiC.PROPERTY_TOP.equals(key)
Expand Down