我正在阅读ProgressBar
源代码并达到onSaveInstanceState
:
public Parcelable onSaveInstanceState() {
// Force our ancestor class to save its state
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.progress = mProgress;
ss.secondaryProgress = mSecondaryProgress;
return ss;
}
可以看出,只保存了progress
andsecondaryProgress
字段,那么用户可以设置的所有其他字段会发生什么,例如max
?为什么他们也没有得救?