Comments (7)
Hi @amazingvoice !
I am a new open source contributor and would like to solve this issue, could you help me understand the issue better by providing some extra references ?
Is this is issue open to contribute ?
from animation-samples.
Hi @shreelakshmijoshi! Just run the demo DrawableAnimations on any android phone or emulator, follow the steps I provided:
start the app DrawableAnimations -> click AnimatedVectorDrawableCompat -> click START -> back press before the animation is done,
then check the logcat to find the stacktrace, you can set some breakpoints to help you understand how it works.
from animation-samples.
The animated fragment is set to null after the animation is completed. When we press the back button , the view gets destroyed but the animated fragment which is bound to the view is still running. We should also destroy the object associated with the view when back button is pressed.
That's why OnBackPressedCallback
function is added which implements the operation of the stop button
override fun onAttach(context: Context){
super.onAttach(context)
val callback: OnBackPressedCallback =object:OnBackPressedCallback(
true
){
override fun handleOnBackPressed(){
binding.stop.performClick()
activity?.supportFragmentManager?.popBackStack()
}
}
requireActivity().onBackPressedDispatcher.addCallback(
this,
callback
)
}
from animation-samples.
@amazingvoice please review my pull request link
from animation-samples.
@shreelakshmijoshi Sorry I'm not the maintainer of this project.
@ggfan Please help review this PR. Thanks!
from animation-samples.
oh okay..
from animation-samples.
@ggfan
Can you or someone else help me review and merge the pull request ?
Thank You!
from animation-samples.
Related Issues (20)
- Google apps animation
- GridToPager does not work if we change the hierarchy
- Samples
- Activity get finished before animation get completes
- javadoc comments misstake HOT 1
- Browse samples: Images are not loading HOT 3
- Licenses for Android SDK not accepted
- Set the progress of Transition manually
- > https://github.com/android/animation-samples/blob/master/DrawableAnimations/app/src/main/java/com/example/android/drawableanimations/ViewBindingDelegates.kt#L30
- Hello world HOT 1
- Curious HOT 1
- Facing issue when using circular Imageview HOT 1
- Animation item inside recyclerview on fragment to other item recyclerview in other fragment not working HOT 1
- GridFrament use with viewpager not working back transition
- [Unsplash] Reenter transition not working edge case
- Transition animation not working when changing RecyclerView To ViewPager to RecyclerView To ViewPager2 HOT 2
- ios software
- Opening Screen Is Scruct at loading Screen HOT 1
- Update to Compose October '22 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animation-samples.