Commit Graph

148 Commits

Author SHA1 Message Date
George Mount
1b4ae634f6 Properly cancel animators when View doesn't exist in starting state.
Bug 19290065

When a transition was interrupted, if a View was not in the start
state, but in the end state, then any animator on that View was
not canceled. This detects that situation and allows canceling
the animator on that View.

Change-Id: Ib1d0579bb6b211782c40c6327be59b0c59682731
2015-05-07 13:00:12 -07:00
George Mount
57436d3f7e Merge "Fix potential NPE in internal isValidTarget method." into mnc-dev 2015-05-04 22:08:03 +00:00
George Mount
f586c925d5 Fix potential NPE in internal isValidTarget method.
Bug 19805383

Change-Id: Ib22d86cca5e1225b12ed39ac988824eeb9c58bbd
2015-05-04 15:01:55 -07:00
George Mount
61bab469a1 Merge "Fix Visibility not changing until Animator ends." into mnc-dev 2015-05-04 20:26:48 +00:00
George Mount
fcfe531e74 Fix Visibility not changing until Animator ends.
Sometimes an animator will be interrupted before it starts
during a transition and the onAnimatorEnd will not be called.
In this case, we must set the final state in the onTransitionEnd.

Bug 20416564

Change-Id: I388895215ba2b1c500de3a5afcae8db1fea288f7
2015-05-04 11:37:27 -07:00
Alan Viverette
904de2ec93 Always force constructors accessible during inflation
We now correctly throw an IllegalAccessException for non-public accesses,
but we were relying on the old incorrect behavior during inflation. This
CL forces constructors to be accessible so that we emulate the old
behavior and don't crash.

Where we were already doing this, the CL moves the setAccessible() call
immediately after the getConstructor() call, since there's no point in
calling it multiple times.

Bug: 20810495
Change-Id: I63dfcb857e445f688080eea05e86ef22760ed49f
2015-05-04 10:32:57 -07:00
Tony Mantler
ab5d66a96a Make sure Transition constructor is accessible before invoking
b/20666031

Change-Id: Ief519ac00aed8ce84cbc852025f91cc03da90c55
2015-04-28 14:17:06 -07:00
George Mount
cef8bed515 Merge "Make TransitionManager.endTransitions() public." 2015-04-09 15:25:53 +00:00
George Mount
478673ede2 Make TransitionManager.endTransitions() public.
Bug 19231835

Change-Id: I151bae1d10aaab72f8fea73eaf0538f0aa5d810a
2015-04-08 14:51:36 -07:00
George Mount
28b3ecca86 Reset transitionAlpha when the transition is stopped early.
Bug 19273502

When a transition runs several animators and is interrupted,
some animators may not have been started. Those animators
that haven't been started will not reset their contents
the same as if the animator was canceled. Fade modifies
transitionAlpha and if it is interrupted prior to the
animator starting, the transitionAlpha doesn't get reset.

Change-Id: I8a49b4fbb7151aadc43d7b10e6acbae9578e5cc4
2015-04-03 15:01:40 -07:00
Tor Norbye
bc2dd79af9 Add @TransitionRes for transition resource integers
Change-Id: I37f523282156c2f87c4d961167d6a980d5f6e34c
2015-03-13 11:19:21 -07:00
George Mount
96e54dcfa4 Fix TransitionManager.go not running transition.
Bug 19459362

Change-Id: I17595390c9fb289dec8de44447ca490c46570fb4
2015-03-03 15:28:44 -08:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
Todd Volkert
0653f2596f Increase visibility of Transition.areValuesChanged() to protected to allow
subclasses outside the android.transition package to override it.

Change-Id: Ib6a5502827e734de7494958b510afc9ddb80dffe
2015-02-12 15:27:57 -08:00
Todd Volkert
fddd7ead7c Merge "Revert "Increase visibility of Transition.areValuesChanged() to protected to allow subclasses outside the android.transition package to override it."" 2015-02-12 23:11:15 +00:00
Todd Volkert
455e0ea8f2 Revert "Increase visibility of Transition.areValuesChanged() to protected to allow subclasses outside the android.transition package to override it."
This reverts commit d23391eafe.

Change-Id: Id7211a0fd08b9bc8ad092501de3c3efa57bf8264
2015-02-12 23:09:19 +00:00
Todd Volkert
09247179cb Merge "Increase visibility of Transition.areValuesChanged() to protected to allow subclasses outside the android.transition package to override it." 2015-02-12 22:52:21 +00:00
Todd Volkert
d23391eafe Increase visibility of Transition.areValuesChanged() to protected to allow
subclasses outside the android.transition package to override it.

Change-Id: Ife5de79b339b6d7598411ad851858f4c52a89f5c
2015-02-12 14:47:20 -08:00
Neil Fuller
a2c7884518 Merge "Remove usages of FloatMath" automerge: a8e8cdb automerge: 27316a9
automerge: c1a5e82

* commit 'c1a5e82c25dba954cf1c06729e53bfb67667bcbb':
  Remove usages of FloatMath
2015-02-12 19:29:45 +00:00
Neil Fuller
c1a5e82c25 Merge "Remove usages of FloatMath" automerge: a8e8cdb
automerge: 27316a9

* commit '27316a93e5979859ae98f506eca365784353007a':
  Remove usages of FloatMath
2015-02-12 10:00:41 +00:00
Neil Fuller
e573aa9371 Remove usages of FloatMath
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: Iec8fb663ed54eb967050f6ff25a36ba534204c4d
2015-02-12 09:20:31 +00:00
Alan Viverette
e025ed2f26 Make popup transition animation play nicely with dismiss/show pair
Previously it was okay to call dismiss/show in quick succession since
the window was removed synchronously. Adding transitions introduced a
delay between dismiss() and actually removing the window, which broke
this behavior.

Change-Id: I0de8ae0a551dcb2eb8b8a50356c308b654ebdc6f
2015-02-02 11:27:21 -08:00
Brian Attwell
74f89e78b0 Unhid ChangeScroll
ChangeScroll is already publicly usable via transition
xml files. This directly unhides the java class.

Bug: 18777272
Change-Id: I3b9982dc4ff3f4e8752b39ee6eb67b617073e2ff
2015-01-05 18:48:49 +00:00
George Mount
419754545e Merge "Reset the transitionAlpha after the transition completes." into lmp-mr1-dev 2014-11-20 15:29:26 +00:00
George Mount
6c211ff43e Reset the transitionAlpha after the transition completes.
Bug 18423893

Change-Id: I2ea30c3b7c45eca70d1518e73f814b827f519fa0
2014-11-19 16:39:16 -08:00
George Mount
2db3bf5c49 Slide supports Gravity.START and Gravity.END.
Bug 18444396

Change-Id: Id7b82b44948e4501c2b4fb5302d22672fa20cd00
2014-11-19 14:14:53 -08:00
George Mount
20559079ab Fix Visibility transitions canceling when nothing has changed.
Bug 18377719

Change-Id: I4ba282bba928781e7b8a62e813cb83f8bf78b58c
2014-11-14 21:02:42 +00:00
George Mount
8f7d3715c5 Merge "Allow PathMotion to affect translations in ChangeTransform." into lmp-mr1-dev 2014-11-10 15:25:10 +00:00
George Mount
fa35d14e43 Allow PathMotion to affect translations in ChangeTransform.
Bug 18207599

Change-Id: I813976527de426ba6fbdc89291d2ecde0135c19d
2014-11-05 12:09:52 -08:00
George Mount
b592d84514 Fix javadoc.
Bug 18183024

Change-Id: Ia29d46e03b0137cc6964dcf488af052486b6898c
2014-10-31 17:19:18 -07:00
Dake Gu
4c2e3491ec Merge "ActivityTransition: Encode scaleType and matrix in snapshot view" into lmp-mr1-dev 2014-10-27 20:23:28 +00:00
George Mount
e0f76e9a6d Merge "Fix transition being canceled improperly." into lmp-mr1-dev 2014-10-27 14:31:29 +00:00
George Mount
b7573c2dba Add resizeClip attribute to ChangeBounds.
Bug 17765948

Added the XML attribute for the resizeClip property of
ChangeBounds. Also updated support for resizing a view
using its clip bounds and position to fix the TODO.

Change-Id: I358d07d6a28fed4b7f39f9ccb9d89b9325f64239
2014-10-24 16:21:01 -07:00
George Mount
d359952459 Use one method to change bounds in ChangeBounds.
Bug 17936593

Instead of calling setLeft(), setTop(), setRight(), setBottom()
separately, make one call that does all at the same time.

Change-Id: I986274f3a98b3136e71204501ffc272986ad31dd
2014-10-23 13:08:15 -07:00
George Mount
cba01b2310 Fix transition being canceled improperly.
Bug 18092208

When a transition is determining whether or not it should be
canceled, the old values and new values are compared. Previously,
the if a value was in the old values, but not in the new values
then the value was considered changed. This discounts that
transitions sometimes don't target views and it may be that
no value was populated.

Change-Id: I8210ba1e44921fadedf9ead571d380ad34e73d3f
2014-10-22 14:39:43 -07:00
George Mount
5ac9b20b41 Allow using setLeft/Top/Right/Bottom to control ChangeBounds.
Bug 17938614

Change-Id: Ia341fdd63ab57ec16a3de6349b7eb07fdc0a48ae
2014-10-10 13:22:36 -07:00
Chris Craik
f791703f9b Avoid changeBounds animations on Views that are not yet laidout
bug:17683930

This means that GONE views with empty bounds don't trigger
ChangeBounds animations the first time they're shown.

Change-Id: I6503c5b0a790d3d31f7566fab27a0b12c5f61f26
2014-10-06 14:55:17 -07:00
George Mount
24314e7d10 Fix ChangeTransform works only once on a View.
Bug 17762118

When ChangeTransform is used on a View, its intermediate values
are being set, but not cleared after the transition completes
unless it uses a GhostView. This CL clears the intermediate
values when the animation ends if no GhostView is used.

Change-Id: I2590d9c2bc36d31023b3e1af94d2bd72c9589eb5
2014-10-01 14:28:05 -07:00
Dake Gu
017b13a50c ActivityTransition: Encode scaleType and matrix in snapshot view
So that SharedElementCallback can setup initial imageView scale
type properly to run transition against.

b/17703309

Change-Id: I0ab212e0413fd666de605bc51ef64c8d66e4d09d
2014-09-30 23:58:57 +00:00
George Mount
2deeaa3314 Target only shared elements with shared element Transition
Bug 17549213
Bug 17553253

Change-Id: If54aebb4e37d2012aa8d1c5354d5ec03f92b81a3
2014-09-19 12:55:20 -07:00
George Mount
7343ba2f80 Merge "Fix broken logic in isValidTarget" into lmp-dev 2014-09-18 22:51:23 +00:00
George Mount
cc82424b44 Fix broken logic in isValidTarget
Bug 17553253

Change-Id: I9f3f2c80e59128fd5f8d4b1b2a67692c00804f62
2014-09-18 11:21:09 -07:00
George Mount
dc5bf6a7f0 Default to using hardware layer during fade transition.
Bug 17499864

When hasOverlappingRendering() is true, a layer is used to
to fade views because performance can be much worse then.
When hasOverlappingRendering() is false, the performance
is not hurt and a layer is not used.

Change-Id: If3fb1c23ffc8d0bef85c9d16df6c26ff4bbd49ac
2014-09-17 15:41:18 -07:00
George Mount
79b2781aa7 Fixed OOM due to visibility transitions.
Have maximum size for Visibility transition bitmaps.

Also changed Visibility to avoid transitioning out child views
while transitioning out their parents.

Also moved view-to-bitmap code to common utility.

Bug 17469198

Change-Id: I05f069a267539b479da1b39cdad2cc9270c5c381
2014-09-15 11:05:36 -07:00
George Mount
5030c7f6f1 Made Transitions act only the views that they target.
Bug 17465989
Bug 17452585

Change-Id: I2f921e98f68df3d549a370179c0a4488d56923ad
2014-09-12 16:15:44 -07:00
George Mount
a374bc049c Merge "Fixed empty TransitionSet not notifying listeners." into lmp-dev 2014-09-11 23:56:36 +00:00
George Mount
e6f66e78a5 Merge "Fixed: TransitionSet setStartDelay did nothing." into lmp-dev 2014-09-11 22:08:36 +00:00
George Mount
04600023d0 Fixed: TransitionSet setStartDelay did nothing.
Bug 17452965

Change-Id: Id2fd6ed3bd8e7156dd3d22dcd83117cec12e3528
2014-09-11 14:59:58 -07:00
George Mount
38a664986b Fixed empty TransitionSet not notifying listeners.
Bug 17469482

Change-Id: I2673960e75737d659e52132f1f3b8230080adb7b
2014-09-11 14:37:20 -07:00
Craig Stout
e988ee1eb2 Omit appearing views that have a parent that is also appearing.
b/17460766

Change-Id: Ib3fe619e271688c93a5cd4cb4d557e6cca5baa34
2014-09-10 23:44:30 +00:00