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
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…