0
在android支持庫的最近更新中,禁用SwipeRefreshLayout也會重置佈局,而之前它沒有使用。禁用SwipeRefreshLayout重置佈局
void reset() {
mCircleView.clearAnimation();
mProgress.stop();
mCircleView.setVisibility(View.GONE);
setColorViewAlpha(MAX_ALPHA);
// Return the circle to its start position
if (mScale) {
setAnimationProgress(0 /* animation complete and view is hidden */);
} else {
setTargetOffsetTopAndBottom(mOriginalOffsetTop - mCurrentTargetOffsetTop,
true /* requires update */);
}
mCurrentTargetOffsetTop = mCircleView.getTop();
}
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
if (!enabled) {
reset();
}
}
我不想reset
當我禁用佈局被調用,但我找不到這樣做的一個簡單方法。我想擴大SwipeRefreshLayout
班和覆蓋setEnabled
,但我不能訪問祖父母班'setEnabled
那樣。有沒有解決的辦法?