Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Jeremy, is this still an issue? I think the problem was that you had two transitions targeting the same View for the same action (e.g. two Slide() transitions).
jb...@google.com <jb...@google.com> #3
I have a similar issue with plain AnimatorSet:
set.start()
set.pause()
set.setCurrentPlayTime(100)
set.setCurrentPlayTime(0)
set.setCurrentPlayTime(100)
set.resume()
doesn't play animation in resume().
re...@infinum.com <re...@infinum.com> #4
Should clarify that if I filter out setCurrentPlayTime(0)
(or replace it with setCurrentPlayTime(1)
) it works well.
Also even with setCurrentPlayTime(0)
, onAnimationEnd
is notified with correct delay (as if the animation has played).
il...@google.com <il...@google.com> #5
@
I think that is intended for Animator. If you set the currentPlayTime
to 0 or the total duration the animator completes. We do some
Description
Version used:1.3.0-alpha06
Devices/Android versions reproduced on: Nexus 5 / 8.1.0
It seams that setFragmentResultListener and clearFragment ResultListener on FragmentManager are not working properly or at least are not working as expected.
Basically once the listener is set is not possible to change or clear it.
I think that's because they are just removing or overwriting the key on mResultListeners dictionary, but it's not removing the observer in the LifecycleOwner. The observer is called anyway.
So it's not possible to change the listener once is set.
There are workarounds, but I think is an important bug of this component.
I've created a simple example project to show that.
That's the relevant part:
private fun openEditFragment(teamId: Int) {
println("asking name for team $teamId")
this.setFragmentResultListener(TeamDefinitionFragment.REQ_TEAM) { resultKey: String, bundle: Bundle ->
if (resultKey == TeamDefinitionFragment.REQ_TEAM) {
this.clearFragmentResultListener(TeamDefinitionFragment.REQ_TEAM) //this has no effect
bundle.getString(TeamDefinitionFragment.RESULT_TEAM_NAME)?.let { teamName ->
println("'$teamName' received for team $teamId")
putName(teamId, teamName)
}
}
this.clearFragmentResultListener(TeamDefinitionFragment.REQ_TEAM) //this has no effect neither, that's more weird
}
findNavController().navigate(R.id.action_main_dest_to_definition_dest)
}
Hope I explained myself good enough.