I had success overriding the onAttachedToWindow()
and onDetachedFromWindow()
methods:
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
// View is now attached
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
// View is now detached, and about to be destroyed
}