Transitions-Everywhere icon indicating copy to clipboard operation
Transitions-Everywhere copied to clipboard

without button click

Open dharmeshrathore opened this issue 4 years ago • 2 comments

Hi All, can we do slide animation without on button click? i want when the activity start then text animate in slide animation starts, without any button click. Please help.

dharmeshrathore avatar May 12 '20 11:05 dharmeshrathore

I'm facing the same problem and apparently you cannot launch a transition from the OnCreate method, which is a pity. However, there seems to be a workaround: you can set an on click listener to a whole transitionsContainer and then imitate a click by transitionsContainer.performClick(). I don't like this solution but for the time being there is no other option.

EDIT: I believe this question on StackOverflow can be of help too: https://stackoverflow.com/questions/55704802/transitionmanager-begindelayedtransition-doesnt-animate-when-activity-first-loa

Using a handler with postDelayed does the trick as described in one of the answers. What I also noticed is that it only works this way if I invoke beginDelayedTransition(transitionsContainer) using the default transition, when I try to define my own transition and run beginDelayedTransition(transitionsContainer, transitions), all the layout elements appear at once after the delay time has passed and there is no fade in effect whatsoever.

Daer7 avatar Oct 31 '20 21:10 Daer7

Vucjbif7vc7gud7

eunavida avatar Dec 13 '21 01:12 eunavida