Closed crazecoder closed 5 years ago
好的,下个版本加入
我的代码
@Override
protected void onWindowVisibilityChanged(int visibility) {
super.onWindowVisibilityChanged(visibility);
if (visibility == VISIBLE) {
startAnimation(0, 1);
} else {
stopAnimation();
}
}
@Override
protected void onDetachedFromWindow() {
stopAnimation();
super.onDetachedFromWindow();
}
建议在onDetachedFromWindow里stopAnimation