Comments (4)
Same problem.
@GuilhE Is annotation processing enabled?
I think the better solution is to migrate to upgraded https://developer.android.com/reference/android/arch/lifecycle/DefaultLifecycleObserver
from progressbutton.
I've tested and this function is being called:
private class ProgressButtonHolder(private val textView: WeakReference<TextView>) :
LifecycleObserver {
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
fun onDestroy() {
textView.get()?.let {
it.cancelAnimations()
it.cleanUpDrawable()
it.removeTextAnimationAttachViewListener()
it.removeDrawableAttachViewListener()
attachedViews.remove(it)
}
}
}
from progressbutton.
The only way I'm getting rid of this leaks is by making sure I'm calling:
bindProgressButton(binding.submitMaterialButton)
and
override fun onDestroy() {
binding.submitMaterialButton.cleanUpDrawable()
super.onDestroy()
}
@razir any thoughts on this?
from progressbutton.
I've found the problem and it was mine, really hard to catch involving removeObservers(), etc.
But I think your suggestion is good and I'll create a PR regarding Google doc:
If you use Java 8 language, always prefer it over annotations.
from progressbutton.
Related Issues (20)
- Question: Use with data binding HOT 2
- defective api for custom view HOT 1
- JAVA Usage? HOT 2
- Migrate to AndroidX ? HOT 1
- [Question] - Image instead of Text HOT 1
- cant set background drawable with . stroke & shape & radius ??? HOT 1
- Progress Bar Stuck Issue HOT 3
- How to implement by using Java HOT 5
- Can I databind textRes and progressState? HOT 1
- How to check if progress is displayed?
- Change progress drawable
- button text is not showing after change visibility to GONE and back to VISIBLE
- Progress Loader is not working when we create refrence of button
- Can't bind AppCompatImgeButton HOT 1
- Bintray Shutting Down May 2021 -- Host artifacts elsewhere? HOT 5
- How do I use this button at XML? HOT 1
- RTL Support
- How to change colors of the loading drawable
- ProgressColor not working with textAllCaps true in api 22 HOT 3
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 progressbutton.