You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 🔥🔥🔥 With transitions, it's required for start and end values to be different from each other to call
309
313
```createAnimator``` method.
310
314
311
-
To make sure that it gets called, either set **captureStartValues**
315
+
-To make sure that **ENTER** or **REENTER** transitions start, either set **captureStartValues**
312
316
and **captureEndValues** manually, or in fragment transitioned to, create **setEnterSharedElementCallback**
313
317
and override **onSharedElementStart** and **onSharedElementEnd** methods and set properties of
314
318
objects that are not shared in both fragments.
@@ -317,9 +321,9 @@ objects that are not shared in both fragments.
317
321
of ***Transition*** start and end point to same value.
318
322
319
323
#### Note:
320
-
🔥🔥🔥 In tutorial 2-4 and 2-5, having same background color for both fragments causing second fragment's **ENTER TRANSITION(CircularReveal and Slide.BOTTOM)** to not work
324
+
🔥🔥🔥 In tutorial 2-4 and 2-5, having same background color for both fragments causing second fragment's **ENTER TRANSITION(CircularReveal and Slide.BOTTOM)** to not work.
321
325
So when using **Transitions** that extend ```Visiblity``` class such as Slide, or Fade be careful about background color.
322
-
Either set callback and set start and end properties for scene with
326
+
Either set callback and set start and end properties for starging and ending scenes with
@@ -352,20 +356,15 @@ Either set callback and set start and end properties for scene with
352
356
}
353
357
```
354
358
355
-
or use **custom transitions** that extend either ```Transition``` or ```Visibility```
359
+
or use **custom transitions** that extend either ```Transition``` or ```Visibility``` and force value changes.
356
360
357
-
*** ⚠️ Transitions that extend ```Visibility``` such as ```Slide```, ```Fade```, or ```Explode``` depends on ***visibility*** of the view. If
358
-
visibility is changed from ```View.INVISIBLE``` to ```View.VISIBLE``````onAppear``` method of ```Visibility class is called, if visibility changes
359
-
opposite ```onDisappear``` method is called. With scene's actual visibility change, or manual visibility change it's possible to play transitions
361
+
* ⚠️ Transitions that extend ```Visibility``` such as ```Slide```, ```Fade```, or ```Explode``` depends on ***visibility*** of the view. If
362
+
visibility is changed from ```View.INVISIBLE``` to ```View.VISIBLE``````onAppear``` method of ```Visibility``` class is called, if visibility changes
363
+
```View.VISIBLE``` to ```View.INVISIBLE``````onDisappear``` method is called. With difference between visibility of starting and ending scenes, or manual visibility change it's possible to play transitions
360
364
from backwards.
361
365
362
-
### ‼️ Attention
363
-
I wasn't able to create exit and return transitions using custom transitions with classes neither
364
-
extend ```Transition``` nor ```Visibility```. Transitions such as Fade, Slide or Explode
365
-
that extend ```Visibility``` work, but when i extend ```Visibility``` and do some custom transitions
366
-
it does not work for **exitTransition** for first, **returnTransition** for second fragment.
367
-
368
-
If you figure out a solution feel free to send a PR🤩😍
366
+
* ⚠️ When current transition is **EXIT** or **RETURN** transition ```captureEndValues``` is not called, because of this use a transition that extends ```Visibility``` for ```exitTransition``` and ```returnTransition``` to start,
367
+
and be aware that Animator from ```onDisAppear``` is called while current transition is exit or return.
Copy file name to clipboardExpand all lines: Tutorial3-1Transitions/src/main/java/com/smarttoolfactory/tutorial3_1transitions/chapter2_fragment_transitions/Fragment2_2LifeCycleFirst.kt
Copy file name to clipboardExpand all lines: Tutorial3-1Transitions/src/main/java/com/smarttoolfactory/tutorial3_1transitions/chapter2_fragment_transitions/Fragment2_5MagazineDetailAlt.kt
+28-3Lines changed: 28 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,8 @@ import kotlin.math.hypot
33
33
34
34
classFragment2_5MagazineDetailAlt : Fragment() {
35
35
36
+
var isEntering =true
37
+
36
38
lateinitvar magazineModel:MagazineModel
37
39
38
40
overridefunonCreate(savedInstanceState:Bundle?) {
@@ -68,7 +70,7 @@ class Fragment2_5MagazineDetailAlt : Fragment() {
Copy file name to clipboardExpand all lines: Tutorial3-1Transitions/src/main/java/com/smarttoolfactory/tutorial3_1transitions/chapter2_fragment_transitions/Fragment2_5ToolbarDetail.kt
0 commit comments